aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/scheck/ok.c
blob: f4a0daabfe9ac3325bfd7ee9264bed99863b8693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
static void ok(int x)
{
	__assert((~x) == (~0 - x));	// true but not simplified yet
	__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
 */