CTest ベースのテストの作成
CTest は、テストフレームワークに関係なく、CMake ベースのプロジェクトのテストを実行することができます。テストはプロジェクトファイル、通常はCMakeLists.txt で設定します。基本的には、プロジェクトのテストを有効にして、テストアプリケーションや特別なコマンドを登録します。
enable_testing() add_test(NAME test_example COMMAND test_example)
テストとして登録する前に、test_example を実行可能ファイルとして追加します。引数を含む実行可能コマンドであれば何でもかまいません。
CTest の使用方法の詳細については、CTest を使用したテストを参照してください。
How To: Test」、「Select the build system」、「Testing」、「Test Results」も参照 。
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.