#include <string.h>
#include <stdio.h>

#define require(e) if (!(e)) fprintf(stderr, "FAILED line %d        %s: %s       %s\n", __LINE__, __FILE__, __func__, #e)

void test_strlen()
{
    require(strlen("") == 0);
    require(strlen("hello") == 5);
}

void test_strcmp()
{
    char *r = "hello", *s = "hello", *t = "he";
    require(strcmp(r,s) == 0);
    require(strcmp(t,r) < 0);
    require(strcmp(s,t) > 0);
}

int main()
{
    test_strlen();
    test_strcmp();
    /* add more tests */

    return 0;
}

