CTest 기반 테스트 생성

CTest는 테스트 프레임워크와 관계없이 CMake 기반 프로젝트의 테스트를 실행할 수 있습니다. 테스트는 일반적으로 CMakeLists.txt 와 같은 프로젝트 파일에서 구성합니다. 기본적으로 프로젝트에 대한 테스트를 활성화하고 테스트 애플리케이션이나 특수 명령어를 등록합니다.

enable_testing()
add_test(NAME test_example COMMAND test_example)

test_example 를 테스트로 등록하기 전에 실행 파일로 추가하십시오. 인수를 포함한 모든 실행 명령어일 수 있습니다.

CTest 사용 방법에 대한 자세한 내용은 ‘CTest를 이용한 테스트’를 참조하십시오.

‘방법: 테스트’, ‘빌드 시스템 선택’ 및 ‘테스트항목도 참조하십시오 .

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.