blob: 9ecb4b7da46c7f3a4b4207665f82adafef7757e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <ccan/structeq/structeq.h>
#include <ccan/tap/tap.h>
struct mydata {
int start, end;
};
int main(void)
{
struct mydata a, b;
/* This is how many tests you plan to run */
plan_tests(3);
a.start = 0;
a.end = 100;
ok1(structeq(&a, &a));
b = a;
ok1(structeq(&a, &b));
b.end++;
ok1(!structeq(&a, &b));
/* This exits depending on whether all tests passed */
return exit_status();
}
|