Criar testes baseados em CTest
O CTest pode executar testes para projetos baseados em CMake, independentemente da estrutura de testes. Você configura os testes no arquivo do projeto, geralmente o ` CMakeLists.txt`. Basicamente, você habilita os testes para o projeto e registra os aplicativos de teste ou até mesmo comandos especiais.
enable_testing() add_test(NAME test_example COMMAND test_example)
Adicione test_example como um executável antes de tentar registrá-lo como teste. Pode ser qualquer comando executável, incluindo argumentos.
Para obter mais informações sobre como usar o CTest, consulte Testando com o CTest.
Veja também Como: Testar, Selecionar o sistema de compilação e Testes.
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.