scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <assert.h>
 2#include <stdio.h>
 3#include <string.h>
 4
 5/*
 6output:
 7testing
 8done
 9end:
10*/
11
12int
13main(void)
14{
15	char buf[40] = {1, 2, 3, 4, 5};
16	signed char buf2[40] = {-127};
17
18	puts("testing");
19	assert(memcmp(buf, (char[]) {1, 2, 3, 4, 5}, 5) == 0);
20	assert(memcmp(buf, (char[]) {1, 1, 1, 1, 1}, 5) > 0);
21	assert(memcmp(buf, (char[]) {1, 3, 1, 1, 1}, 5) < 0);
22	assert(memcmp(buf, (char[]) {2, 3, 4, 5, 6}, 0) == 0);
23	assert(memcmp(buf2, (char[]) {-127}, 1) == 0);
24	puts("done");
25
26	return 0;
27}