Rewrote test cases with new syntax
This commit is contained in:
parent
3635eef15a
commit
362b904900
@ -25,15 +25,15 @@ data ro gIntegerArrayInitialized:Int:16
|
|||||||
4785
|
4785
|
||||||
92
|
92
|
||||||
data ro jObject:thing.Thing.thing.thing
|
data ro jObject:thing.Thing.thing.thing
|
||||||
.that 2139
|
-- that 2139
|
||||||
.this 324
|
-- this 324
|
||||||
data ro kNestedObject:Obj
|
data ro kNestedObject:Obj
|
||||||
.that
|
-- that
|
||||||
.bird2 123.8439
|
-- bird2 123.8439
|
||||||
.bird3 9328.21348239
|
-- bird3 9328.21348239
|
||||||
.this
|
-- this
|
||||||
.bird0 324
|
-- bird0 324
|
||||||
.bird1 "hello world"
|
-- bird1 "hello world"
|
||||||
data ro lMutIntegerArray16:Int:16:mut
|
data ro lMutIntegerArray16:Int:16:mut
|
||||||
data ro mExternalData:Int:8
|
data ro mExternalData:Int:8
|
||||||
external
|
external
|
||||||
|
@ -2,30 +2,33 @@ package parser
|
|||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
|
// TODO: merge this test with the type test
|
||||||
func TestObjt (test *testing.T) {
|
func TestObjt (test *testing.T) {
|
||||||
checkTree ("../tests/parser/objt", false,
|
checkTree ("../tests/parser/objt", false,
|
||||||
`:arf
|
`:arf
|
||||||
---
|
---
|
||||||
objt ro Basic:Obj
|
type ro aBasic:Obj
|
||||||
ro that:Basic
|
ro that:Int
|
||||||
ro this:Basic
|
ro this:Int
|
||||||
objt ro BitFields:Obj
|
type ro bBitFields:Obj
|
||||||
ro that:Int & 1
|
ro that:Int & 1
|
||||||
ro this:Int & 24 298
|
ro this:Int & 24 298
|
||||||
objt ro ComplexInit:Obj
|
type ro cInit: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
|
|
||||||
ro that:String "hello world"
|
ro that:String "hello world"
|
||||||
ro this:Int 23
|
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)
|
`, test)
|
||||||
}
|
}
|
||||||
|
@ -25,16 +25,17 @@ data ro gIntegerArrayInitialized:Int:16
|
|||||||
# TODO: maybe test identifiers somewhere else?
|
# TODO: maybe test identifiers somewhere else?
|
||||||
data ro jObject:thing.Thing.
|
data ro jObject:thing.Thing.
|
||||||
thing.thing
|
thing.thing
|
||||||
.this 324
|
-- this 324
|
||||||
.that 2139
|
-- that 2139
|
||||||
|
|
||||||
data ro kNestedObject:Obj
|
data ro kNestedObject:Obj
|
||||||
.this
|
-- this
|
||||||
.bird0 324
|
-- bird0 324
|
||||||
.bird1 "hello world"
|
-- bird1 "hello world"
|
||||||
.that
|
ro newMember:Int 9023
|
||||||
.bird2 123.8439
|
-- that
|
||||||
.bird3 9328.21348239
|
-- bird2 123.8439
|
||||||
|
-- bird3 9328.21348239
|
||||||
|
|
||||||
data ro lMutIntegerArray16:Int:16:mut
|
data ro lMutIntegerArray16:Int:16:mut
|
||||||
|
|
||||||
|
@ -1,25 +1,27 @@
|
|||||||
:arf
|
:arf
|
||||||
---
|
---
|
||||||
objt ro Basic:Obj
|
type ro aBasic:Obj
|
||||||
ro that:Basic
|
ro that:Int
|
||||||
ro this:Basic
|
ro this:Int
|
||||||
|
|
||||||
objt ro BitFields:Obj
|
type ro bBitFields:Obj
|
||||||
ro that:Int & 1
|
ro that:Int & 1
|
||||||
ro this:Int & 24 298
|
ro this:Int & 24 298
|
||||||
|
|
||||||
objt ro Init:Obj
|
type ro cInit:Obj
|
||||||
ro that:String "hello world"
|
ro that:String "hello world"
|
||||||
ro this:Int 23
|
ro this:Int 23
|
||||||
|
|
||||||
objt ro ComplexInit:Obj
|
type ro dInitInherit:aBasic
|
||||||
ro whatever:Int:3
|
-- that 9384
|
||||||
230984
|
-- this 389
|
||||||
849 394580
|
|
||||||
ro complex0:Bird
|
type ro cInitAndDefine:aBasic
|
||||||
.that 98
|
-- this 389
|
||||||
.this 2
|
ro these:aBasic
|
||||||
ro complex1:Bird
|
ro born:Int 4
|
||||||
.that 98902
|
ro in:Int
|
||||||
.this 235
|
ro the:Int:3
|
||||||
ro basic:Int 87
|
9348 92384 92834
|
||||||
|
-- this 98
|
||||||
|
-- that 9384
|
||||||
|
@ -7,12 +7,12 @@ data ro aExternalData:Int
|
|||||||
data ro bSingleValue:Int 342
|
data ro bSingleValue:Int 342
|
||||||
|
|
||||||
data ro cNestedObject:Obj
|
data ro cNestedObject:Obj
|
||||||
.this
|
-- this
|
||||||
.bird0 324
|
-- bird0 324
|
||||||
.bird1 "hello world"
|
-- bird1 "hello world"
|
||||||
.that
|
-- that
|
||||||
.bird2 123.8439
|
-- bird2 123.8439
|
||||||
.bird3 9328.21348239
|
-- bird3 9328.21348239
|
||||||
|
|
||||||
data ro dUninitialized:Int:16:mut
|
data ro dUninitialized:Int:16:mut
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ func ro fComplexFunction
|
|||||||
398 9 2309 983 -2387
|
398 9 2309 983 -2387
|
||||||
478 555 123
|
478 555 123
|
||||||
= bird:Bird
|
= bird:Bird
|
||||||
.that
|
-- that
|
||||||
.whenYou 99999
|
-- whenYou 99999
|
||||||
.this 324
|
-- this 324
|
||||||
|
|
||||||
func ro gExternalFunction
|
func ro gExternalFunction
|
||||||
> x:Int
|
> x:Int
|
||||||
|
Reference in New Issue
Block a user