/* * Author: Patrick-Christopher Mattulat * Co-Author: Claude Sonnet 4.6 (LLM) * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2023-02-07 * Changed: 2026-06-23 * * */ #include #include using ls::standard::core::ExceptionMessage; using std::string; using std::string_view; using testing::Test; namespace { class ExceptionMessageTest : public Test { public: ExceptionMessageTest() = default; ~ExceptionMessageTest() override = default; }; TEST_F(ExceptionMessageTest, toCharacterPointer) { const string text = "hello!"; ExceptionMessage message{text}; const string_view characterField = message.toCharacterPointer(); ASSERT_STREQ(text.c_str(), characterField.data()); } TEST_F(ExceptionMessageTest, toCharacterPointer_empty) { ExceptionMessage message{""}; ASSERT_TRUE(message.toCharacterPointer() == nullptr); } }