Vytvoření testů založených na CTest
CTest dokáže spouštět testy pro projekty založené na CMake bez ohledu na testovací framework. Testy se konfigurují v projektovém souboru, obvykle v souboru CMakeLists.txt. V zásadě se v něm povolí testování projektu a zaregistrují se testovací aplikace nebo dokonce speciální příkazy.
enable_testing() add_test(NAME test_example COMMAND test_example)
Než se pokusíte zaregistrovat test_example jako test, přidejte jej jako spustitelný soubor. Může se jednat o jakýkoli spustitelný příkaz včetně argumentů.
Další informace o používání CTestu najdete v části Testování pomocí CTestu.
Viz také Jak na to: Testování, Výběr systému sestavování a Testování.
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.