diff options
Diffstat (limited to 'test/programs')
-rw-r--r-- | test/programs/add-1-3.cps | 3 | ||||
-rw-r--r-- | test/programs/index.ts | 9 | ||||
-rw-r--r-- | test/programs/primop-scope.cps | 5 | ||||
-rw-r--r-- | test/programs/string-equal.cps | 1 | ||||
-rw-r--r-- | test/programs/string-unequal.cps | 1 |
5 files changed, 17 insertions, 2 deletions
diff --git a/test/programs/add-1-3.cps b/test/programs/add-1-3.cps index 95b9939..66759f7 100644 --- a/test/programs/add-1-3.cps +++ b/test/programs/add-1-3.cps @@ -1,2 +1 @@ -PRIMOP(+, [INT 1, INT 2], [u], - [APP(LABEL identity, [VAR u])])
\ No newline at end of file +PRIMOP(+, [REAL 1.0, INT 3], [result], [])
\ No newline at end of file diff --git a/test/programs/index.ts b/test/programs/index.ts index e0403fd..c8f3c85 100644 --- a/test/programs/index.ts +++ b/test/programs/index.ts @@ -4,4 +4,13 @@ export namespace TestPrograms { export const AddOneThree = Bun.file( join(import.meta.dir + '/add-1-3.cps'), ).text(); + export const PrimopScope = Bun.file( + join(import.meta.dir + '/primop-scope.cps'), + ).text(); + export const StringEquality = Bun.file( + join(import.meta.dir + '/string-equal.cps'), + ).text(); + export const StringInEquality = Bun.file( + join(import.meta.dir + '/string-unequal.cps'), + ).text(); } diff --git a/test/programs/primop-scope.cps b/test/programs/primop-scope.cps new file mode 100644 index 0000000..eb834fd --- /dev/null +++ b/test/programs/primop-scope.cps @@ -0,0 +1,5 @@ +PRIMOP(+, [REAL 1.0, INT 3], [result], [ + PRIMOP(-, [REAL 1.0, VAR result], [result], [ + PRIMOP(+, [VAR result, REAL 0], [], []) + ]) +])
\ No newline at end of file diff --git a/test/programs/string-equal.cps b/test/programs/string-equal.cps new file mode 100644 index 0000000..ea49b22 --- /dev/null +++ b/test/programs/string-equal.cps @@ -0,0 +1 @@ +PRIMOP(==, ["asdf", "asdf"], [result], [])
\ No newline at end of file diff --git a/test/programs/string-unequal.cps b/test/programs/string-unequal.cps new file mode 100644 index 0000000..ccd278e --- /dev/null +++ b/test/programs/string-unequal.cps @@ -0,0 +1 @@ +PRIMOP(==, ["asdfasdf", "asdf"], [result], []) |