From ac3d3b4c38581cb6d04b03f6bd172199832eeeb2 Mon Sep 17 00:00:00 2001 From: enzoevers Date: Mon, 9 Dec 2024 08:08:21 +0100 Subject: [PATCH] test: add test_RAII_STRING_MacroWorksInScope to tests to run --- CoDeLib/Test/src/TestRaiiString.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CoDeLib/Test/src/TestRaiiString.c b/CoDeLib/Test/src/TestRaiiString.c index af4fe5d5..6f97fb47 100644 --- a/CoDeLib/Test/src/TestRaiiString.c +++ b/CoDeLib/Test/src/TestRaiiString.c @@ -132,11 +132,11 @@ __attribute__((optnone)) #endif TEST(TestRaiiString, test_RAII_STRING_MacroWorksInScope) { char **pointerToScopedRaiiStringString = NULL; - *pointerToScopedRaiiStringString = NULL; { RAII_STRING myString = RaiiStringCreateFromCString("Hello, world!"); pointerToScopedRaiiStringString = &myString.pString; + TEST_ASSERT_NOT_NULL(pointerToScopedRaiiStringString); TEST_ASSERT_NOT_NULL(*pointerToScopedRaiiStringString); TEST_ASSERT_EQUAL_STRING("Hello, world!", *pointerToScopedRaiiStringString); @@ -305,6 +305,9 @@ TEST_GROUP_RUNNER(TestRaiiString) { RUN_TEST_CASE(TestRaiiString, test_RaiiStringClean_SetsNullptrInObject); RUN_TEST_CASE(TestRaiiString, test_RaiiStringClean_SetsLengthZeroInObject); + // RAII_STRING + RUN_TEST_CASE(TestRaiiString, test_RAII_STRING_MacroWorksInScope); + // RaiiStringAppend() RUN_TEST_CASE( TestRaiiString,