summaryrefslogtreecommitdiffstats
path: root/tests/string.c
blob: e3d68f4a0868de7873b2932ebba53f5b0629b9dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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))
Go back to lisible.xyz