Luna/tests/libc/string.c
2022-10-16 15:31:58 +02:00

21 lines
279 B
C

#include "Test.h"
#include <string.h>
DEFINE_TEST(strlen)
{
START_TEST(strlen);
const char* str = "Hello, World!";
size_t len = strlen(str);
EXPECT_EQ(len, 13);
char null[] = {'\0'};
len = strlen(null);
EXPECT_EQ(len, 0);
TEST_SUCCESS();
}