mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
C++ SharedString API: allow assigning from const char *
There is already a constructor that takes a char*, so there should be an assignment operator as well
This commit is contained in:
parent
0083bd8d23
commit
3ab11b62e6
2 changed files with 17 additions and 3 deletions
|
@ -27,6 +27,12 @@ SCENARIO("SharedString API")
|
|||
str = foo_view;
|
||||
REQUIRE(str == "Foo");
|
||||
}
|
||||
|
||||
SECTION("Construct from char*")
|
||||
{
|
||||
str = "Bar";
|
||||
REQUIRE(str == "Bar");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Basic SharedVector API", "[vector]")
|
||||
|
@ -73,4 +79,4 @@ TEST_CASE("C++ Timers")
|
|||
Timer testTimer(std::chrono::milliseconds(16), []() { sixtyfps::quit_event_loop(); });
|
||||
|
||||
sixtyfps::run_event_loop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue