diff options
| author | krasimir <krasimir@chalmers.se> | 2010-02-01 08:58:46 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-02-01 08:58:46 +0000 |
| commit | 1cd4a500f5f6b4802d3288734ea1e6144f0be770 (patch) | |
| tree | 5e7bca3e81b00c66f3fd44d95ac8c450e04c1def | |
| parent | 2d3de22b17db0482d242ace8f18f97547dd27c8c (diff) | |
added tests for literals in the abstract syntax
| -rw-r--r-- | testsuite/compiler/typecheck/abstract/LitAbs.gf | 15 | ||||
| -rw-r--r-- | testsuite/compiler/typecheck/abstract/LitAbs.gfs | 6 | ||||
| -rw-r--r-- | testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold | 5 |
3 files changed, 26 insertions, 0 deletions
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
|
