diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-05-09 08:58:14 +0900 |
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-05-09 08:58:14 +0900 |
| commit | 5a26e1f481fe85f08093a414e27c1056b85c6715 (patch) | |
| tree | 20a2384554cfcb437a4b604e02b4a9978507cafc /tests/string.c | |
Initial commit
Diffstat (limited to '')
| -rw-r--r-- | tests/string.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/string.c b/tests/string.c new file mode 100644 index 0000000..e3d68f4 --- /dev/null +++ b/tests/string.c @@ -0,0 +1,14 @@ +#include "lisiblestd/memory.h" +#include "test.h" +#include <lisiblestd/string.h> + +void t_String_from_str(void) { + String string; + String_from_str(&system_allocator, &string, "Some string"); + T_ASSERT(strncmp(string.value, "Some string", 11)); + T_ASSERT_EQ(string.length, 11); + + String_destroy(&system_allocator, &string); +} + +TEST_SUITE(TEST(t_String_from_str)) |
