From 1cd4a500f5f6b4802d3288734ea1e6144f0be770 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 1 Feb 2010 08:58:46 +0000 Subject: [PATCH] added tests for literals in the abstract syntax --- testsuite/compiler/typecheck/abstract/LitAbs.gf | 15 +++++++++++++++ testsuite/compiler/typecheck/abstract/LitAbs.gfs | 6 ++++++ .../compiler/typecheck/abstract/LitAbs.gfs.gold | 5 +++++ 3 files changed, 26 insertions(+) create mode 100644 testsuite/compiler/typecheck/abstract/LitAbs.gf create mode 100644 testsuite/compiler/typecheck/abstract/LitAbs.gfs create mode 100644 testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold diff --git a/testsuite/compiler/typecheck/abstract/LitAbs.gf b/testsuite/compiler/typecheck/abstract/LitAbs.gf new file mode 100644 index 000000000..03f850232 --- /dev/null +++ b/testsuite/compiler/typecheck/abstract/LitAbs.gf @@ -0,0 +1,15 @@ +abstract LitAbs = { + +cat CStr String ; + CInt Int ; + CFloat Float ; + +data empty : CStr "" ; + null : CStr [] ; + other : CStr "other" ; + +data zero : CInt 0 ; + +data pi : CFloat 3.14 ; + +} \ No newline at end of file diff --git a/testsuite/compiler/typecheck/abstract/LitAbs.gfs b/testsuite/compiler/typecheck/abstract/LitAbs.gfs new file mode 100644 index 000000000..ce10daa20 --- /dev/null +++ b/testsuite/compiler/typecheck/abstract/LitAbs.gfs @@ -0,0 +1,6 @@ +i -src testsuite/compiler/typecheck/abstract/LitAbs.gf +ai null +ai empty +ai other +ai zero +ai pi \ No newline at end of file diff --git a/testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold b/testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold new file mode 100644 index 000000000..83dda9094 --- /dev/null +++ b/testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold @@ -0,0 +1,5 @@ +data null : CStr "" +data empty : CStr "" +data other : CStr "other" +data zero : CInt 0 +data pi : CFloat 3.14