Boost 테스트 생성

Boost 테스트를 빌드하고 실행하려면 컴퓨터에 Boost.Test를 설치하십시오. 일반적으로 Boost 설치 패키지에는 Boost.Test가 포함되어 있습니다. Boost.org에서 Boost를 다운로드하십시오.

컴파일러와 빌드 시스템이 Boost 라이브러리를 찾을 수 있다면, 테스트를 생성할 때 포함 디렉터리를 지정할 필요가 없습니다.

Boost 테스트를 생성하려면:

  1. File > New Project > Test Project 로 이동합니다.
  2. Boost Test Project > Choose 을 선택하여 Boost 테스트용 기본 코드가 포함된 프로젝트를 생성합니다.
  3. Project and Test Information 대화 상자에서 프로젝트 및 테스트에 대한 설정을 지정합니다.

    Boost 테스트 프로젝트 마법사의 ‘프로젝트 및 테스트 정보’ 대화 상자

    1. Test framework 에서 Boost Test (header only) 를 선택하여 필요한 헤더를 포함하거나, Boost Test (shared libraries) 를 선택하여 Boost Test에 링크하십시오.
    2. ' Test suite name'에서 테스트 스위트의 이름을 입력합니다.
    3. Test case name 에서 테스트 케이스 이름을 입력합니다.
    4. Boost include directory (optional) 에서 version.hpp 및 테스트 헤더 파일이 포함된 test 하위 폴더와 같이 Boost.Test에 필요한 파일이 있는 디렉터리의 경로를 입력합니다.
    5. Build system 에서 프로젝트 빌드에 사용할 빌드 시스템(CMake, qmake 또는 Qbs)을 선택합니다.

Qt Creator 프로젝트 디렉터리 내에 테스트를 생성합니다.

Boost 테스트 생성에 대한 자세한 내용은 Boost.Test를 참조하십시오.

참고: 테스트를 스캔할, 파서는 Boost 테스트 라이브러리 헤더 중 하나( boost/test/ 로 시작하고 .hpp 접미사가 붙은 모든 include)를 직간접적으로 포함하는 파일만 고려합니다. 현재 빌드되지 않는 파일은 무시됩니다.

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

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.