Rewrote test cases with new syntax

This commit is contained in:
2022-09-11 10:52:53 -04:00
parent 3635eef15a
commit 362b904900
5 changed files with 64 additions and 58 deletions

View File

@@ -25,15 +25,15 @@ data ro gIntegerArrayInitialized:Int:16
4785
92
data ro jObject:thing.Thing.thing.thing
.that 2139
.this 324
-- that 2139
-- this 324
data ro kNestedObject:Obj
.that
.bird2 123.8439
.bird3 9328.21348239
.this
.bird0 324
.bird1 "hello world"
-- that
-- bird2 123.8439
-- bird3 9328.21348239
-- this
-- bird0 324
-- bird1 "hello world"
data ro lMutIntegerArray16:Int:16:mut
data ro mExternalData:Int:8
external

View File

@@ -2,30 +2,33 @@ package parser
import "testing"
// TODO: merge this test with the type test
func TestObjt (test *testing.T) {
checkTree ("../tests/parser/objt", false,
`:arf
---
objt ro Basic:Obj
ro that:Basic
ro this:Basic
objt ro BitFields:Obj
type ro aBasic:Obj
ro that:Int
ro this:Int
type ro bBitFields:Obj
ro that:Int & 1
ro this:Int & 24 298
objt ro ComplexInit:Obj
ro whatever:Int:3
230984
849
394580
ro complex0:Bird
.that 98
.this 2
ro complex1:Bird
.that 98902
.this 235
ro basic:Int 87
objt ro Init:Obj
type ro cInit:Obj
ro that:String "hello world"
ro this:Int 23
type ro dInitInherit:aBasic
-- that 9384
-- this 389
type ro cInitAndDefine:aBasic
-- this 389
ro these:aBasic
ro born:Int 4
ro in:Int
ro the:Int:3
9348
92384
92834
-- this 98
-- that 9384
`, test)
}