mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added tests for literals in the abstract syntax
This commit is contained in:
15
testsuite/compiler/typecheck/abstract/LitAbs.gf
Normal file
15
testsuite/compiler/typecheck/abstract/LitAbs.gf
Normal file
@@ -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 ;
|
||||
|
||||
}
|
||||
6
testsuite/compiler/typecheck/abstract/LitAbs.gfs
Normal file
6
testsuite/compiler/typecheck/abstract/LitAbs.gfs
Normal file
@@ -0,0 +1,6 @@
|
||||
i -src testsuite/compiler/typecheck/abstract/LitAbs.gf
|
||||
ai null
|
||||
ai empty
|
||||
ai other
|
||||
ai zero
|
||||
ai pi
|
||||
5
testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold
Normal file
5
testsuite/compiler/typecheck/abstract/LitAbs.gfs.gold
Normal file
@@ -0,0 +1,5 @@
|
||||
data null : CStr ""
|
||||
|
||||
data empty : CStr ""
|
||||
|
||||
data other : CStr "other"
|
||||
Reference in New Issue
Block a user