21 lines
279 B
C
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();
|
|
} |