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.