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.
2022-08-24 05:22:24 +00:00
|
|
|
package parser
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2022-09-11 14:52:53 +00:00
|
|
|
// TODO: merge this test with the type test
|
2022-08-24 05:22:24 +00:00
|
|
|
func TestObjt (test *testing.T) {
|
2022-09-05 18:52:37 +00:00
|
|
|
checkTree ("../tests/parser/objt", false,
|
2022-08-24 05:22:24 +00:00
|
|
|
`:arf
|
|
|
|
---
|
2022-09-11 14:52:53 +00:00
|
|
|
type ro aBasic:Obj
|
|
|
|
ro that:Int
|
|
|
|
ro this:Int
|
|
|
|
type ro bBitFields:Obj
|
2022-08-24 22:37:44 +00:00
|
|
|
ro that:Int & 1
|
|
|
|
ro this:Int & 24 298
|
2022-09-11 14:52:53 +00:00
|
|
|
type ro cInit:Obj
|
2022-08-24 05:22:24 +00:00
|
|
|
ro that:String "hello world"
|
|
|
|
ro this:Int 23
|
2022-09-11 14:52:53 +00:00
|
|
|
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
|
2022-08-24 05:22:24 +00:00
|
|
|
`, test)
|
|
|
|
}
|