Ustvarjanje testov na podlagi CTest
CTest lahko izvaja teste za projekte, ki temeljijo na CMake, ne glede na testni okvir. Teste konfigurirate v projektni datoteki, običajno v datoteki CMakeLists.txt. V bistvu omogočite testiranje za projekt in registrirate testne aplikacije ali celo posebne ukaze.
enable_testing() add_test(NAME test_example COMMAND test_example)
Preden poskušate registrirati test_example kot test, ga dodajte kot izvedljivo datoteko. To je lahko kateri koli izvedljivi ukaz, vključno z argumenti.
Za več informacij o uporabi CTesta glejte Testiranje s CTestom.
Glejte tudi Kako: Testiranje, Izberite sistem za gradnjo in Testiranje.
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.