C++ testing: gate under the experimental feature

This commit is contained in:
Olivier Goffart 2024-05-03 10:49:25 +02:00 committed by GitHub
parent 6bcbc827c4
commit 6c58f4f492
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 4 deletions

View file

@ -241,7 +241,7 @@ jobs:
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: CMakeLists.txt
cmakeAppendedArgs: "-DSLINT_BUILD_TESTING=ON -DSLINT_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Debug -DSLINT_FEATURE_RENDERER_SKIA=ON -DSLINT_FEATURE_BACKEND_QT=ON"
cmakeAppendedArgs: "-DSLINT_BUILD_TESTING=ON -DSLINT_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Debug -DSLINT_FEATURE_RENDERER_SKIA=ON -DSLINT_FEATURE_BACKEND_QT=ON -DSLINT_FEATURE_EXPERIMENTAL=ON -DSLINT_FEATURE_TESTING=ON"
buildDirectory: ${{ runner.workspace }}/cppbuild
buildWithCMakeArgs: "--config Debug"
- name: ctest

View file

@ -2,7 +2,6 @@
# Changelog
All notable changes to this project are documented in this file.
## [1.6.0] - Unreleased
## General

View file

@ -7,6 +7,7 @@
#include <string_view>
#ifdef SLINT_FEATURE_TESTING
# ifdef SLINT_FEATURE_EXPERIMENTAL
namespace slint::testing {
/// Init the testing backend.
@ -173,4 +174,5 @@ public:
}
# endif // SLINT_FEATURE_EXPERIMENTAL
#endif // SLINT_FEATURE_TESTING

View file

@ -16,7 +16,7 @@ add_executable(todo main.cpp)
target_link_libraries(todo PRIVATE todo_lib)
if(SLINT_BUILD_TESTING AND SLINT_FEATURE_TESTING)
if(SLINT_BUILD_TESTING AND SLINT_FEATURE_TESTING AND SLINT_FEATURE_EXPERIMENAL)
add_executable(test_todo_basic tests/test_todo_basic.cpp)
target_link_libraries(test_todo_basic PRIVATE Catch2::Catch2 todo_lib)
add_test(NAME test_todo_basic COMMAND test_todo_basic)

View file

@ -18,7 +18,7 @@ path = "main.rs"
name = "test-driver-cpp"
[dependencies]
slint-cpp = { workspace = true, features = ["testing", "std"] }
slint-cpp = { workspace = true, features = ["testing", "std", "experimental"] }
[dev-dependencies]
i-slint-compiler = { workspace = true, features = ["default", "cpp", "display-diagnostics"] }