summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unit/core/test-string.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/core/test-string.cpp b/tests/unit/core/test-string.cpp
index 2a937b6a0..19e7c89c4 100644
--- a/tests/unit/core/test-string.cpp
+++ b/tests/unit/core/test-string.cpp
@@ -1374,12 +1374,12 @@ TEST(String, Dyn)
POINTERS_EQUAL(NULL, string_dyn_alloc (0));
str = string_dyn_alloc (1);
+ ptr_string_dyn = (struct t_string_dyn *)str;
CHECK(str);
CHECK(*str);
STRCMP_EQUAL("", *str);
/* check internal structure content */
- ptr_string_dyn = (struct t_string_dyn *)str;
LONGS_EQUAL(1, ptr_string_dyn->size_alloc);
LONGS_EQUAL(1, ptr_string_dyn->size);
STRCMP_EQUAL("", ptr_string_dyn->string);
@@ -1418,6 +1418,7 @@ TEST(String, Dyn)
string_dyn_free (str, 1);
str = string_dyn_alloc (1);
+ ptr_string_dyn = (struct t_string_dyn *)str;
/* check concat with NULL */
LONGS_EQUAL(1, string_dyn_concat (str, NULL));