diff --git a/api/sixtyfps-cpp/CMakeLists.txt b/api/sixtyfps-cpp/CMakeLists.txt index 66f4addc3..06355f7a5 100644 --- a/api/sixtyfps-cpp/CMakeLists.txt +++ b/api/sixtyfps-cpp/CMakeLists.txt @@ -135,6 +135,6 @@ if(BUILD_TESTING) FetchContent_MakeAvailable(Catch2) add_executable(api_tests tests/tests.cpp) - target_link_libraries(api_tests PRIVATE Catch2::Catch2) + target_link_libraries(api_tests PRIVATE SixtyFPS Catch2::Catch2) add_test(api_tests api_tests) endif() diff --git a/api/sixtyfps-cpp/tests/tests.cpp b/api/sixtyfps-cpp/tests/tests.cpp index cd1cea64b..d61eff377 100644 --- a/api/sixtyfps-cpp/tests/tests.cpp +++ b/api/sixtyfps-cpp/tests/tests.cpp @@ -11,12 +11,19 @@ LICENSE END */ #define CATCH_CONFIG_MAIN #include "catch2/catch.hpp" -SCENARIO("SixtyFPS can be shipped") -{ - GIVEN("a boolean") - { - bool okay = true; +#include - REQUIRE(okay); +SCENARIO("SharedString API") +{ + sixtyfps::SharedString str; + + REQUIRE(str.empty()); + + SECTION("Construct from string_view") + { + std::string foo("Foo"); + std::string_view foo_view(foo); + str = foo_view; + REQUIRE(str == "Foo"); } } \ No newline at end of file