This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
arf/parser/type_test.go

61 lines
726 B
Go
Raw Normal View History

package parser
import "testing"
func TestType (test *testing.T) {
2022-09-05 12:52:37 -06:00
checkTree ("../tests/parser/type", false,
`:arf
---
2022-09-16 20:45:08 -06:00
type ro aBasic:Obj:
(
.ro that:Int
.ro this:Int
)
type ro bBitFields:Obj:
(
.ro that:Int & 1
.ro this:Int:<298> & 24
)
type ro cInit:Obj:
(
.ro that:String:<"hello world">
.ro this:Int:<23>
)
type ro dInitInherit:aBasic:
(
.that:<9384>
.this:<389>
)
type ro eInitAndDefine:aBasic:
2022-09-16 20:45:08 -06:00
(
.ro these:aBasic:
(
.ro born:Int:<4>
.ro in:Int
.ro the:Int:3:
<
9348
92384
92834
>
2022-09-16 20:45:08 -06:00
):
(
.this:<98>
)
):
(
.that:<9384>
.this:<389>
)
2022-09-11 13:35:07 -06:00
type ro fBasic:Int
2022-09-16 20:45:08 -06:00
type ro gBasicInit:Int:<6>
2022-09-11 13:35:07 -06:00
type ro hIntArray:{Int ..}
2022-09-16 20:45:08 -06:00
type ro iIntArrayInit:Int:3:
<
3298
923
92
2022-09-16 20:45:08 -06:00
>
`, test)
}