부스트 테스트 생성
부스트 테스트를 빌드하고 실행하려면 컴퓨터에 Boost.Test를 설치합니다. 일반적으로 부스트 설치에 포함되어 있습니다. Boost .org에서 Boost를 다운로드합니다.
컴파일러와 빌드 시스템에서 부스트 라이브러리를 찾을 수 있는 경우 테스트를 만들 때 포함 디렉터리를 지정할 필요가 없습니다.
부스트 테스트를 생성하려면 다음과 같이 하세요:
- File > New Project > Test Project 로 이동합니다.
- Boost Test Project > Choose 을 선택하여 부스트 테스트를 위한 상용구 코드가 포함된 프로젝트를 생성합니다.
- Project and Test Information 대화 상자에서 프로젝트 및 테스트에 대한 설정을 지정합니다:

- Test framework 에서 Boost Test (header only) 을 선택하여 필요한 헤더를 포함하거나 Boost Test (shared libraries) 을 선택하여 부스트 테스트에 연결합니다.
- Test suite name 에 테스트 세트의 이름을 입력합니다.
- Test case name 에 테스트 케이스의 이름을 입력합니다.
- Boost include directory (optional) 에
version.hpp및 테스트 헤더 파일이 포함된test하위 폴더와 같이 Boost.Test에 필요한 파일이 있는 디렉터리 경로를 입력합니다. - Build system 에서 프로젝트 빌드에 사용할 빌드 시스템을 선택합니다: CMake, qmake 또는 Qbs.
Qt Creator 프로젝트 디렉터리에 테스트를 생성합니다.
부스트 테스트 생성에 대한 자세한 내용은 Boost.Test를 참조하세요.
참고: 테스트를 검색하는 동안 파서는 Boost의 테스트 라이브러리 헤더 중 하나를 직간접적으로 포함하는 파일만 고려합니다( boost/test/ 로 시작하고 .hpp 접미사가 있는 모든 파일 포함). 현재 빌드되지 않는 파일은 무시됩니다.
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.