aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/scheck/ok.c
blob: 76c04c4f68701c198ed7b3aa3f563618f8991942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
static void ok(int x)
{
	__assert((~x) == (~0 - x));	// true but not simplified yet
}

static void also_ok(int x)
{
	__assert_eq(~x, ~0 - x);
}

static void always(int x)
{
	__assert((x - x) == 0);		// true and simplified
}

/*
 * check-name: scheck-ok
 * check-command: scheck $file
 */