Added more stuff to type test case

This commit is contained in:
Sasha Koshka 2022-10-01 17:12:43 -04:00
parent 0d53d7ad32
commit 07540e0abc
3 changed files with 17 additions and 3 deletions

View File

@ -23,7 +23,7 @@ type ObjectMember struct {
// even if there is a private permission in another module, we still
// need to include it in the semantic analysis because we need to know
// how many members objects have.
// what members objects have.
permission types.Permission
what Type

View File

@ -4,8 +4,16 @@ import "testing"
func TestTypeSection (test *testing.T) {
checkTree ("../tests/analyzer/typeSection", false,
`typeSection ../tests/analyzer/typeSection.basicInt
`typeSection ro ../tests/analyzer/typeSection.aBasicInt
type 1 basic Int
arg uint 5
typeSection ro ../tests/analyzer/typeSection.bOnBasicInt
type 1 basic aBasicInt
typeSection ro ../tests/analyzer/typeSection.cBasicObject
type 1 basic Obj
member ro that
type 1 basic Int
member ro this
type 1 basic Int
`, test)
}

View File

@ -1,4 +1,10 @@
:arf
---
type ro basicInt:Int 5
type ro aBasicInt:Int 5
type ro bOnBasicInt:aBasicInt
type ro cBasicObject:Obj
ro that:Int
ro this:Int