2
0
Эх сурвалжийг харах

add tests for ".." and alphanumeric symbols

- single commit only containing the tests, no other code changes (Bruceys latest commit already fixes the outstanding issues of bmx-ng/bcc-#57 and bcc-ng/bcc-#59)
Ronny Otto 10 жил өмнө
parent
commit
fc30974926

+ 43 - 22
tests/framework/language/dotdot_01.bmx

@@ -1,39 +1,60 @@
-Strict
+Rem
+	The following code checks various variants to use the ".." concatenator
+End Rem
+SuperStrict
+Framework brl.StandardIO
 
-Framework brl.standardio
+Type Test
+	Field fa:Int = 12, ..
+	      fb:Int = 13
+	Field fc:Int = 14 ..
+	      , fd:Int = 15
 
+	Function MyFunction:Int( ..    
+	          a:Int, ..
+	          b:Int ..
+	         )
+		Print a+","+b
+	End Function
 
+	Function MyFunctionB:Int(..
+	          a:Int ..
+	          , b:Int ..
+	         )
+		Print a+","+b
+	End Function
 
+	Method MyMethod()
+		Print fa+","+fb+","+fc+","+fd
+	End Method
+End Type
 
+Global T:Test = New Test
+T.MyFunction(8,9)
+T.MyFunctionB(10,11)
+T.MyMethod()
 
 
-Function RenderText(text:String, xpos:Int, ypos:Int, centered:Int = False, ..
-					  shadow:Int = False, caps:Int = False)
+Local a:Int=1, b:Int=2, ..
+      c:Int=3
+Local d:Int=4, e:Int=5 ..
+      , f:Int=6
 
-End Function
+Print a+","+b+","+c+","+d+","+e+","+f
 
 
-Extern
 
-Function Decode_Ogg:Byte Ptr(..
-	datasource:Object,..
-	reado(buf@Ptr,size,nmemb,src:Object),..
-	seeko(src:Object,offset:Long,whence),..
-	closeo(src:Object),..
-	tello(src:Object ),..
-	samples Var,channels Var,freq Var)
+Global ga:Int=1, gb:Int=2, ..
+       gc:Int=3
+Global gd:Int=4, ge:Int=5 ..
+       , gf:Int=6
 
-End Extern
+Print ga+","+gb+","+gc+","+gd+","+ge+","+gf
 
 
-Function createIO:Int()
-	Return test(test2(10, ..
-			15, Null, Null))
-End Function
 
-Function test:Int(val:Int)
-End Function
+Global ..
+ gg:Int = 7
 
-Function test2:Int(a:Int, b:Int, x:Object, y:Object)
-End Function
+Print gg
 

+ 6 - 0
tests/framework/language/dotdot_01.res

@@ -0,0 +1,6 @@
+1,2,3,4,5,6
+1,2,3,4,5,6
+7
+8,9
+10,11
+12,13,14,15

+ 30 - 0
tests/framework/language/symbols_01.bmx

@@ -0,0 +1,30 @@
+Framework BRL.standardIO
+
+Type Mode
+	Method Create:Mode()
+	EndMethod
+EndType
+
+Function ShrMe:Int(test:Int)
+	Return 1
+End Function
+
+If ShrMe(10) Then Print "SymbolFuncOk"
+
+
+Local a:Int = 20
+a:Mod..
+3
+
+Function MyFunc(..
+	a:Int, ..
+	b:Int ..
+	)
+	'hehe
+End Function
+
+
+Print a
+
+a = a Mod 2
+Print a

+ 3 - 0
tests/framework/language/symbols_01.res

@@ -0,0 +1,3 @@
+SymbolFuncOk
+2
+0