From: Michael Urman Date: Mon, 18 Mar 2002 03:02:54 +0000 (-0000) Subject: Tests for define with parameters. X-Git-Tag: v0.1.0~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95e784bf75e9a0dfd508e9a6b5909c077c5a862e;p=yasm Tests for define with parameters. svn path=/trunk/yasm/; revision=523 --- diff --git a/modules/preprocs/yapp/Makefile.inc b/modules/preprocs/yapp/Makefile.inc index 8e301dc8..7231436e 100644 --- a/modules/preprocs/yapp/Makefile.inc +++ b/modules/preprocs/yapp/Makefile.inc @@ -26,12 +26,16 @@ EXTRA_DIST += \ src/preprocs/yapp/tests/ddefine.pre \ src/preprocs/yapp/tests/rdefine.asm \ src/preprocs/yapp/tests/rdefine.pre \ + src/preprocs/yapp/tests/pdefine.asm \ + src/preprocs/yapp/tests/pdefine.pre \ src/preprocs/yapp/tests/ifdef.asm \ src/preprocs/yapp/tests/ifdef.pre \ src/preprocs/yapp/tests/include.asm \ src/preprocs/yapp/tests/include.pre \ src/preprocs/yapp/tests/rinclude.asm \ - src/preprocs/yapp/tests/rinclude.pre + src/preprocs/yapp/tests/rinclude.pre \ + src/preprocs/yapp/tests/params.asm \ + src/preprocs/yapp/tests/params.pre CLEANFILES += \ raw.yp \ @@ -39,7 +43,9 @@ CLEANFILES += \ define.yp \ ddefine.yp \ rdefine.yp \ + pdefine.yp \ ifdef.yp \ include.yp \ - rinclude.yp + rinclude.yp \ + params.yp diff --git a/modules/preprocs/yapp/tests/params.asm b/modules/preprocs/yapp/tests/params.asm new file mode 100644 index 00000000..046775e8 --- /dev/null +++ b/modules/preprocs/yapp/tests/params.asm @@ -0,0 +1,2 @@ +%define foo(a, b) (a)+(b) + foo((a+b,c),(d*e,f)) diff --git a/modules/preprocs/yapp/tests/params.pre b/modules/preprocs/yapp/tests/params.pre new file mode 100644 index 00000000..2826a669 --- /dev/null +++ b/modules/preprocs/yapp/tests/params.pre @@ -0,0 +1,2 @@ +%line 2+1 ./src/preprocs/yapp/tests/params.asm + ((a+b,c))+((d*e,f)) diff --git a/modules/preprocs/yapp/tests/pdefine.asm b/modules/preprocs/yapp/tests/pdefine.asm new file mode 100644 index 00000000..ebde9222 --- /dev/null +++ b/modules/preprocs/yapp/tests/pdefine.asm @@ -0,0 +1,6 @@ +%define foo(bar) bar+1 +%define foo(bar, baz) bar-baz + mov ax, foo + mov ax, foo(5) + mov ax, foo(5, 3) + mov ax, foo(5, 6, 7) diff --git a/modules/preprocs/yapp/tests/pdefine.pre b/modules/preprocs/yapp/tests/pdefine.pre new file mode 100644 index 00000000..0054ee84 --- /dev/null +++ b/modules/preprocs/yapp/tests/pdefine.pre @@ -0,0 +1,5 @@ +%line 3+1 ./src/preprocs/yapp/tests/pdefine.asm + mov ax, foo + mov ax, 5+1 + mov ax, 5-3 + mov ax, foo(5, 6, 7) diff --git a/src/preprocs/yapp/Makefile.inc b/src/preprocs/yapp/Makefile.inc index 8e301dc8..7231436e 100644 --- a/src/preprocs/yapp/Makefile.inc +++ b/src/preprocs/yapp/Makefile.inc @@ -26,12 +26,16 @@ EXTRA_DIST += \ src/preprocs/yapp/tests/ddefine.pre \ src/preprocs/yapp/tests/rdefine.asm \ src/preprocs/yapp/tests/rdefine.pre \ + src/preprocs/yapp/tests/pdefine.asm \ + src/preprocs/yapp/tests/pdefine.pre \ src/preprocs/yapp/tests/ifdef.asm \ src/preprocs/yapp/tests/ifdef.pre \ src/preprocs/yapp/tests/include.asm \ src/preprocs/yapp/tests/include.pre \ src/preprocs/yapp/tests/rinclude.asm \ - src/preprocs/yapp/tests/rinclude.pre + src/preprocs/yapp/tests/rinclude.pre \ + src/preprocs/yapp/tests/params.asm \ + src/preprocs/yapp/tests/params.pre CLEANFILES += \ raw.yp \ @@ -39,7 +43,9 @@ CLEANFILES += \ define.yp \ ddefine.yp \ rdefine.yp \ + pdefine.yp \ ifdef.yp \ include.yp \ - rinclude.yp + rinclude.yp \ + params.yp diff --git a/src/preprocs/yapp/tests/params.asm b/src/preprocs/yapp/tests/params.asm new file mode 100644 index 00000000..046775e8 --- /dev/null +++ b/src/preprocs/yapp/tests/params.asm @@ -0,0 +1,2 @@ +%define foo(a, b) (a)+(b) + foo((a+b,c),(d*e,f)) diff --git a/src/preprocs/yapp/tests/params.pre b/src/preprocs/yapp/tests/params.pre new file mode 100644 index 00000000..2826a669 --- /dev/null +++ b/src/preprocs/yapp/tests/params.pre @@ -0,0 +1,2 @@ +%line 2+1 ./src/preprocs/yapp/tests/params.asm + ((a+b,c))+((d*e,f)) diff --git a/src/preprocs/yapp/tests/pdefine.asm b/src/preprocs/yapp/tests/pdefine.asm new file mode 100644 index 00000000..ebde9222 --- /dev/null +++ b/src/preprocs/yapp/tests/pdefine.asm @@ -0,0 +1,6 @@ +%define foo(bar) bar+1 +%define foo(bar, baz) bar-baz + mov ax, foo + mov ax, foo(5) + mov ax, foo(5, 3) + mov ax, foo(5, 6, 7) diff --git a/src/preprocs/yapp/tests/pdefine.pre b/src/preprocs/yapp/tests/pdefine.pre new file mode 100644 index 00000000..0054ee84 --- /dev/null +++ b/src/preprocs/yapp/tests/pdefine.pre @@ -0,0 +1,5 @@ +%line 3+1 ./src/preprocs/yapp/tests/pdefine.asm + mov ax, foo + mov ax, 5+1 + mov ax, 5-3 + mov ax, foo(5, 6, 7)