Crear pruebas basadas en CTest
CTest puede ejecutar pruebas para proyectos basados en CMake, independientemente del marco de pruebas. Las pruebas se configuran en el archivo del proyecto, normalmente CMakeLists.txt. Básicamente, se habilitan las pruebas para el proyecto y se registran las aplicaciones de prueba o incluso comandos especiales.
enable_testing() add_test(NAME test_example COMMAND test_example)
Añade test_example como ejecutable antes de intentar registrarlo como prueba. Puede ser cualquier comando ejecutable, incluidos los argumentos.
Para obtener más información sobre cómo utilizar CTest, consulta «Pruebas con CTest».
Véase también «Cómo: Realizar pruebas», «Seleccionar el sistema de compilación» y «Pruebas».
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.