Rewrote test cases with new syntax
This commit is contained in:
		
							parent
							
								
									3635eef15a
								
							
						
					
					
						commit
						362b904900
					
				| @ -25,15 +25,15 @@ data ro gIntegerArrayInitialized:Int:16 | ||||
| 	4785 | ||||
| 	92 | ||||
| data ro jObject:thing.Thing.thing.thing | ||||
| 	.that 2139 | ||||
| 	.this 324 | ||||
| 	-- that 2139 | ||||
| 	-- this 324 | ||||
| data ro kNestedObject:Obj | ||||
| 	.that | ||||
| 		.bird2 123.8439 | ||||
| 		.bird3 9328.21348239 | ||||
| 	.this | ||||
| 		.bird0 324 | ||||
| 		.bird1 "hello world" | ||||
| 	-- that | ||||
| 		-- bird2 123.8439 | ||||
| 		-- bird3 9328.21348239 | ||||
| 	-- this | ||||
| 		-- bird0 324 | ||||
| 		-- bird1 "hello world" | ||||
| data ro lMutIntegerArray16:Int:16:mut | ||||
| data ro mExternalData:Int:8 | ||||
| 	external | ||||
|  | ||||
| @ -2,30 +2,33 @@ package parser | ||||
| 
 | ||||
| import "testing" | ||||
| 
 | ||||
| // TODO: merge this test with the type test | ||||
| func TestObjt (test *testing.T) { | ||||
| 	checkTree ("../tests/parser/objt", false, | ||||
| `:arf | ||||
| --- | ||||
| objt ro Basic:Obj | ||||
| 	ro that:Basic | ||||
| 	ro this:Basic | ||||
| objt ro BitFields:Obj | ||||
| type ro aBasic:Obj | ||||
| 	ro that:Int | ||||
| 	ro this:Int | ||||
| type ro bBitFields:Obj | ||||
| 	ro that:Int & 1 | ||||
| 	ro this:Int & 24 298 | ||||
| objt ro ComplexInit:Obj | ||||
| 	ro whatever:Int:3 | ||||
| 		230984 | ||||
| 		849 | ||||
| 		394580 | ||||
| 	ro complex0:Bird | ||||
| 		.that 98 | ||||
| 		.this 2 | ||||
| 	ro complex1:Bird | ||||
| 		.that 98902 | ||||
| 		.this 235 | ||||
| 	ro basic:Int 87 | ||||
| objt ro Init:Obj | ||||
| 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) | ||||
| } | ||||
|  | ||||
| @ -25,16 +25,17 @@ data ro gIntegerArrayInitialized:Int:16 | ||||
| # TODO: maybe test identifiers somewhere else? | ||||
| data ro jObject:thing.Thing. | ||||
| 	thing.thing | ||||
| 	.this 324 | ||||
| 	.that 2139 | ||||
| 	-- this 324 | ||||
| 	-- that 2139 | ||||
| 
 | ||||
| data ro kNestedObject:Obj | ||||
| 	.this | ||||
| 		.bird0 324 | ||||
| 		.bird1 "hello world" | ||||
| 	.that | ||||
| 		.bird2 123.8439 | ||||
| 		.bird3 9328.21348239 | ||||
| 	-- this | ||||
| 		-- bird0 324 | ||||
| 		-- bird1 "hello world" | ||||
| 	ro newMember:Int 9023 | ||||
| 	-- that | ||||
| 		-- bird2 123.8439 | ||||
| 		-- bird3 9328.21348239 | ||||
| 
 | ||||
| data ro lMutIntegerArray16:Int:16:mut | ||||
| 
 | ||||
|  | ||||
| @ -1,25 +1,27 @@ | ||||
| :arf | ||||
| --- | ||||
| objt ro Basic:Obj | ||||
| 	ro that:Basic | ||||
| 	ro this:Basic | ||||
| type ro aBasic:Obj | ||||
| 	ro that:Int | ||||
| 	ro this:Int | ||||
| 
 | ||||
| objt ro BitFields:Obj | ||||
| type ro bBitFields:Obj | ||||
| 	ro that:Int & 1 | ||||
| 	ro this:Int & 24 298 | ||||
| 
 | ||||
| objt ro Init:Obj | ||||
| type ro cInit:Obj | ||||
| 	ro that:String "hello world" | ||||
| 	ro this:Int 23 | ||||
| 
 | ||||
| objt ro ComplexInit:Obj | ||||
| 	ro whatever:Int:3 | ||||
| 		230984 | ||||
| 		849 394580 | ||||
| 	ro complex0:Bird | ||||
| 		.that 98 | ||||
| 		.this 2 | ||||
| 	ro complex1:Bird | ||||
| 		.that 98902 | ||||
| 		.this 235 | ||||
| 	ro basic:Int 87 | ||||
| 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 | ||||
|  | ||||
| @ -7,12 +7,12 @@ data ro aExternalData:Int | ||||
| data ro bSingleValue:Int 342 | ||||
| 
 | ||||
| data ro cNestedObject:Obj | ||||
| 	.this | ||||
| 		.bird0 324 | ||||
| 		.bird1 "hello world" | ||||
| 	.that | ||||
| 		.bird2 123.8439 | ||||
| 		.bird3 9328.21348239 | ||||
| 	-- this | ||||
| 		-- bird0 324 | ||||
| 		-- bird1 "hello world" | ||||
| 	-- that | ||||
| 		-- bird2 123.8439 | ||||
| 		-- bird3 9328.21348239 | ||||
| 
 | ||||
| data ro dUninitialized:Int:16:mut | ||||
| 
 | ||||
| @ -28,9 +28,9 @@ func ro fComplexFunction | ||||
| 		398 9 2309 983 -2387 | ||||
| 		478 555 123 | ||||
| 	= bird:Bird | ||||
| 		.that | ||||
| 			.whenYou 99999 | ||||
| 		.this 324 | ||||
| 		-- that | ||||
| 			-- whenYou 99999 | ||||
| 		-- this 324 | ||||
| 
 | ||||
| func ro gExternalFunction | ||||
| 	> x:Int | ||||
|  | ||||
		Reference in New Issue
	
	Block a user