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.