History

test/pp: cleanup

grischka committed 10 years ago

Commit 6d2be311 parent 0d9f88e6 files · +20 −74Browse files

Unified · Split

6 files
  1. tests/pp/02.expect +2 −2
  2. tests/pp/14.c +12 −10
  3. tests/pp/14.expect +3 −8
  4. tests/pp/15.c +0 −26
  5. tests/pp/15.expect +0 −26
  6. tests/pp/Makefile +3 −2
tests/pp/02.expect+2−2
@@ -1,6 +1,6 @@
1f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);1f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
2f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);2f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
3 3
4char c[2][6] = { "hello", "" };4char c[2][6] = { "hello", "" };
5f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);5f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
6f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);6f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
tests/pp/14.c+12−10
@@ -1,11 +1,13 @@
1extern int printf(const char *format, ...);1#define W Z
2#define P ++2#define Z(X) W(X,2)
3#define n(x) x3#define Y(X) Z(X)
4#define X Y
5return X(X(1));
4 6
5int main(void)7#define P Q
6{8#define Q(n) P(n,2)
7 int a = 0, b = -1;9return P(1);
8 int i1 = a P+P b;10
9 printf("i1 = %d\n", i1);11#define A (B * B)
10 return n(0x1e)n(-1);12#define B (A + A)
11}13return A + B;
tests/pp/14.expect+3−8
@@ -1,8 +1,3 @@
1extern int printf(const char *format, ...);1return Z(Z(1,2),2);
2int main(void)2return Q(1,2);
3{3return ((A + A) * (A + A)) + ((B * B) + (B * B));
4 int a = 0, b = -1;
5 int i1 = a +++ ++ b;
6 printf("i1 = %d\n", i1);
7 return 0x1e -1;
8}
tests/pp/15.c+0−26
@@ -1,26 +0,0 @@
1#define Y(x) Z(x)
2#define X Y
3X(1)
4X(X(1))
5X(X(X(X(X(1)))))
6
7#define A B
8#define B A
9return A + B;
10
11#undef A
12#undef B
13
14#define A B+1
15#define B A
16return A + B;
17
18#define A1 B1+1
19#define B1 C1+2
20#define C1 A1+3
21return A1 + B1;
22
23#define i() x
24#define n() 1
25i()i()n()n()i()
26i()+i()-n()+n()-
tests/pp/15.expect+0−26
@@ -1,26 +0,0 @@
1
2
3Z(1)
4Z(Z(1))
5Z(Z(Z(Z(Z(1)))))
6
7
8
9return A + B;
10
11
12
13
14
15
16return A+1 + B+1;
17
18
19
20
21return A1+3 +2 +1 + B1+1 +3 +2;
22
23
24
25x x 1 1 x
26x+x-1 +1 -
tests/pp/Makefile+3−2
@@ -3,6 +3,7 @@ · 2 unmodified lines
3#3#
4 4
5TCC = ../../tcc5TCC = ../../tcc
6
6TESTS = $(patsubst %.c,%.test,$(wildcard *.c))7TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
7TESTS += $(patsubst %.S,%.test,$(wildcard *.S))8TESTS += $(patsubst %.S,%.test,$(wildcard *.S))
8 9
@@ -35,8 +36,8 @@ DIFF_OPTS = -Nu -b -B -I "^\#" · 26 unmodified lines
35clean:36clean:
36 rm -vf *.output37 rm -vf *.output
37 38
3802.test : DIFF_OPTS += -w39# 02.test : DIFF_OPTS += -w
3915.test : DIFF_OPTS += -w40# 15.test : DIFF_OPTS += -w
40 41
41# diff options:42# diff options:
42# -b ighore space changes43# -b ighore space changes

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t