CTest-alapú tesztek létrehozása
A CTest a tesztkeretrendszertől függetlenül képes futtatni a CMake-alapú projektek tesztjeit. A teszteket a projektfájlban, általában a CMakeLists.txt fájlban kell konfigurálni. Alapvetően engedélyezni kell a projekt tesztelését, majd regisztrálni kell a tesztalkalmazásokat vagy akár speciális parancsokat is.
enable_testing() add_test(NAME test_example COMMAND test_example)
Mielőtt tesztként regisztrálná, adja hozzá a test_example fájlt végrehajtható fájlként. Ez bármilyen végrehajtható parancs lehet, argumentumokkal együtt.
A CTest használatáról további információkat a CTest-tel történő tesztelés című részben talál.
Lásd még : Hogyan: Tesztelés, A fordítási rendszer kiválasztása és Tesztelés.
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.