Updated test case for new syntax
This commit is contained in:
parent
464826f447
commit
7731fa86a1
@ -6,9 +6,13 @@ func TestData (test *testing.T) {
|
|||||||
checkTree ("../tests/parser/data",
|
checkTree ("../tests/parser/data",
|
||||||
`:arf
|
`:arf
|
||||||
---
|
---
|
||||||
data ro integer:Int 3202
|
data ro aInteger:Int 3202
|
||||||
data ro integerArray16:{Int 16}
|
data ro bMutInteger:Int:mut 3202
|
||||||
data ro integerArrayInitialized:{Int 16}
|
data ro cIntegerPointer:{Int}
|
||||||
|
data ro dMutIntegerPointer:{Int}:mut
|
||||||
|
data ro eIntegerArray16:Int:16
|
||||||
|
data ro fIntegerArrayVariable:{Int ..}
|
||||||
|
data ro gIntegerArrayInitialized:Int:16
|
||||||
3948
|
3948
|
||||||
293
|
293
|
||||||
293049
|
293049
|
||||||
@ -20,19 +24,15 @@ data ro integerArrayInitialized:{Int 16}
|
|||||||
0
|
0
|
||||||
4785
|
4785
|
||||||
92
|
92
|
||||||
data ro integerArrayVariable:{Int ..}
|
data ro jObject:thing.Thing.thing.thing
|
||||||
data ro integerPointer:{Int}
|
.this 324
|
||||||
data ro mutInteger:Int:mut 3202
|
.that 2139
|
||||||
data ro mutIntegerPointer:{Int}:mut
|
data ro kNestedObject:Obj
|
||||||
data ro nestedObject:Obj
|
|
||||||
.that
|
|
||||||
.bird2 123.8439
|
|
||||||
.bird3 9328.21348239
|
|
||||||
.this
|
.this
|
||||||
.bird0 324
|
.bird0 324
|
||||||
.bird1 "hello world"
|
.bird1 "hello world"
|
||||||
data ro object:thing.thing.thing.thing
|
.that
|
||||||
.that 2139
|
.bird2 123.8439
|
||||||
.this 324
|
.bird3 9328.21348239
|
||||||
`, test)
|
`, test)
|
||||||
}
|
}
|
||||||
|
@ -1,54 +1,37 @@
|
|||||||
:arf
|
:arf
|
||||||
---
|
---
|
||||||
|
|
||||||
data ro integer:Int 3202
|
data ro aInteger:Int 3202
|
||||||
|
|
||||||
data ro mutInteger:Int:mut 3202
|
data ro bMutInteger:Int:mut 3202
|
||||||
|
|
||||||
data ro integerPointer:{Int}
|
data ro cIntegerPointer:{Int}
|
||||||
|
|
||||||
data ro mutIntegerPointer:{Int}:mut
|
data ro dMutIntegerPointer:{Int}:mut
|
||||||
|
|
||||||
data ro integerArray16:{Int 16}
|
data ro eIntegerArray16:Int:16
|
||||||
|
|
||||||
data ro integerArrayVariable:{Int ..}
|
data ro fIntegerArrayVariable:{Int ..}
|
||||||
|
|
||||||
data ro integerArrayInitialized:{Int 16}
|
data ro gIntegerArrayInitialized:Int:16
|
||||||
3948 293 293049 948 912
|
3948 293 293049 948 912
|
||||||
340 0 2304 0 4785 92
|
340 0 2304 0 4785 92
|
||||||
|
|
||||||
# TODO: reinstate these two after phrase parsing is implemented
|
# TODO: reinstate these two after phrase parsing is implemented
|
||||||
# data wr integerPointerInit:{Int} [& integer]
|
# data wr hIntegerPointerInit:{Int} [& integer]
|
||||||
|
|
||||||
# data wr mutIntegerPointerInit:{Int}:mut [& integer]
|
# data wr iMutIntegerPointerInit:{Int}:mut [& integer]
|
||||||
|
|
||||||
# TODO: maybe test identifiers somewhere else?
|
# TODO: maybe test identifiers somewhere else?
|
||||||
data ro object:thing.thing.
|
data ro jObject:thing.Thing.
|
||||||
thing.thing
|
thing.thing
|
||||||
.this 324
|
.this 324
|
||||||
.that 2139
|
.that 2139
|
||||||
|
|
||||||
data ro nestedObject:Obj
|
data ro kNestedObject: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
|
||||||
|
|
||||||
|
|
||||||
# func ro main
|
|
||||||
# ---
|
|
||||||
# # TODO: set should be a special case, checking under itself for object
|
|
||||||
# member initialization args. it should also check for args in general
|
|
||||||
# under there which should be treated as array initialization args.
|
|
||||||
# basically, under a set phrase, it should do the same checks that it
|
|
||||||
# does under a data section.
|
|
||||||
#
|
|
||||||
# [set object:Obj]
|
|
||||||
# .this 324
|
|
||||||
# .that 2139
|
|
||||||
#
|
|
||||||
# set object:Obj
|
|
||||||
# .this 324
|
|
||||||
# .that 2139
|
|
||||||
|
Reference in New Issue
Block a user