mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
29 lines
No EOL
756 B
C++
29 lines
No EOL
756 B
C++
/* LICENSE BEGIN
|
|
This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
|
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
|
Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
|
|
|
|
SPDX-License-Identifier: GPL-3.0-only
|
|
This file is also available under commercial licensing terms.
|
|
Please contact info@sixtyfps.io for more information.
|
|
LICENSE END */
|
|
|
|
#define CATCH_CONFIG_MAIN
|
|
#include "catch2/catch.hpp"
|
|
|
|
#include <sixtyfps.h>
|
|
|
|
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");
|
|
}
|
|
} |