mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 12:58:23 +00:00
C++ testing: gate under the experimental feature
This commit is contained in:
parent
6bcbc827c4
commit
6c58f4f492
5 changed files with 5 additions and 4 deletions
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
|
@ -241,7 +241,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
||||||
cmakeListsTxtPath: CMakeLists.txt
|
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
|
buildDirectory: ${{ runner.workspace }}/cppbuild
|
||||||
buildWithCMakeArgs: "--config Debug"
|
buildWithCMakeArgs: "--config Debug"
|
||||||
- name: ctest
|
- name: ctest
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project are documented in this file.
|
All notable changes to this project are documented in this file.
|
||||||
|
|
||||||
## [1.6.0] - Unreleased
|
## [1.6.0] - Unreleased
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#ifdef SLINT_FEATURE_TESTING
|
#ifdef SLINT_FEATURE_TESTING
|
||||||
|
# ifdef SLINT_FEATURE_EXPERIMENTAL
|
||||||
|
|
||||||
namespace slint::testing {
|
namespace slint::testing {
|
||||||
/// Init the testing backend.
|
/// Init the testing backend.
|
||||||
|
|
@ -173,4 +174,5 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# endif // SLINT_FEATURE_EXPERIMENTAL
|
||||||
#endif // SLINT_FEATURE_TESTING
|
#endif // SLINT_FEATURE_TESTING
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ add_executable(todo main.cpp)
|
||||||
target_link_libraries(todo PRIVATE todo_lib)
|
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)
|
add_executable(test_todo_basic tests/test_todo_basic.cpp)
|
||||||
target_link_libraries(test_todo_basic PRIVATE Catch2::Catch2 todo_lib)
|
target_link_libraries(test_todo_basic PRIVATE Catch2::Catch2 todo_lib)
|
||||||
add_test(NAME test_todo_basic COMMAND test_todo_basic)
|
add_test(NAME test_todo_basic COMMAND test_todo_basic)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ path = "main.rs"
|
||||||
name = "test-driver-cpp"
|
name = "test-driver-cpp"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
slint-cpp = { workspace = true, features = ["testing", "std"] }
|
slint-cpp = { workspace = true, features = ["testing", "std", "experimental"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
i-slint-compiler = { workspace = true, features = ["default", "cpp", "display-diagnostics"] }
|
i-slint-compiler = { workspace = true, features = ["default", "cpp", "display-diagnostics"] }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue