diff --git a/parser/objt_test.go b/parser/objt_test.go deleted file mode 100644 index aa3651b..0000000 --- a/parser/objt_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package parser - -import "testing" - -// TODO: merge this test with the type test -func TestObjt (test *testing.T) { - checkTree ("../tests/parser/objt", false, -`:arf ---- -type ro aBasic:Obj - ro that:Int - ro this:Int -type ro bBitFields:Obj - ro that:Int & 1 - ro this:Int & 24 298 -type ro cInit:Obj - ro that:String "hello world" - 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) -} diff --git a/parser/type_test.go b/parser/type_test.go index db05b06..b84d339 100644 --- a/parser/type_test.go +++ b/parser/type_test.go @@ -6,10 +6,34 @@ func TestType (test *testing.T) { checkTree ("../tests/parser/type", false, `:arf --- -type ro Basic:Int -type ro BasicInit:Int 6 -type ro IntArray:{Int ..} -type ro IntArrayInit:Int:3 +type ro aBasic:Obj + ro that:Int + ro this:Int +type ro bBitFields:Obj + ro that:Int & 1 + ro this:Int & 24 298 +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 + -- this 389 + ro these:aBasic + ro born:Int 4 + ro in:Int + ro the:Int:3 + 9348 + 92384 + 92834 + -- this 98 + -- that 9384 + +type ro fBasic:Int +type ro gBasicInit:Int 6 +type ro hIntArray:{Int ..} +type ro iIntArrayInit:Int:3 3298 923 92 diff --git a/tests/parser/objt/main.arf b/tests/parser/objt/main.arf deleted file mode 100644 index 795bba3..0000000 --- a/tests/parser/objt/main.arf +++ /dev/null @@ -1,27 +0,0 @@ -:arf ---- -type ro aBasic:Obj - ro that:Int - ro this:Int - -type ro bBitFields:Obj - ro that:Int & 1 - ro this:Int & 24 298 - -type ro cInit:Obj - ro that:String "hello world" - 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 diff --git a/tests/parser/type/main.arf b/tests/parser/type/main.arf index 7c84c2a..3500e3f 100644 --- a/tests/parser/type/main.arf +++ b/tests/parser/type/main.arf @@ -1,10 +1,36 @@ :arf --- -type ro Basic:Int +type ro aBasic:Obj + ro that:Int + ro this:Int -type ro BasicInit:Int 6 +type ro bBitFields:Obj + ro that:Int & 1 + ro this:Int & 24 298 -type ro IntArray:{Int ..} +type ro cInit:Obj + ro that:String "hello world" + ro this:Int 23 -type ro IntArrayInit:Int:3 +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 + +type ro fBasic:Int + +type ro gBasicInit:Int 6 + +type ro hIntArray:{Int ..} + +type ro iIntArrayInit:Int:3 3298 923 92