diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-02-28 14:59:28 -0500 |
---|---|---|
committer | simponic <elizabeth.hunt@simponic.xyz> | 2024-02-28 14:59:28 -0500 |
commit | 7cc3ef5fa1feec8087618c899441a11052f84c48 (patch) | |
tree | 6d65d585fcf61e9cee7193dfb2af4d719074f732 /test/programs | |
parent | c8336ee48791f00378a35e463e2962f4c856beb2 (diff) | |
download | cps-interpreter-7cc3ef5fa1feec8087618c899441a11052f84c48.tar.gz cps-interpreter-7cc3ef5fa1feec8087618c899441a11052f84c48.zip |
builtin_match_signatures (#1)
Co-authored-by: Lizzy Hunt <lizzy.hunt@usu.edu>
Reviewed-on: https://git.simponic.xyz/simponic/cps-interpreter/pulls/1
Co-authored-by: Elizabeth Hunt <elizabeth.hunt@simponic.xyz>
Co-committed-by: Elizabeth Hunt <elizabeth.hunt@simponic.xyz>
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], []) |