Following tests are submtted by Manish Sinha <manishkumarsinha@sify.com>
* Arguments_ByValueA:
* Arguments_ByValueB:
* Arguments_ByValueC:
* Arguments_ByValueD:
* Arguments_ByReferenceA:
* Arguments_ByReferenceB:
* Arguments_ByReferenceC:
* Arguments_ByReferenceD:
* Function_ArguByValueA:
* Function_ArguByValueB:
* Function_ArguByValueC:
* Function_ArguByValueD:
* Function_ArguByReferenceA:
* Function_ArguByReferenceB:
* Function_ArguByReferenceC:
* Function_ArguByReferenceD:
* ParamArrayA:
* ParamArrayB:
* Function_ParamArrayA:
* Function_ParamArrayB:
* Function_ParamArrayc:
* ParamArrayC2:
* Function_ParamArrayC1:
* Function_ParamArrayC2:
* Function_ParamArrayC3:
* Function_ParamArrayC4i:
* Test.Sources: Included new test
svn path=/trunk/mcs/; revision=32858
--- /dev/null
+'==========================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.0.0: Argument Passing by Reference, which means the procedure can modify the variable\r
+' itself.\r
+'===========================================================================================\r
+\r
+Imports System\r
+Module APR_1_0_0\r
+ Sub F(ByRef p As Integer)\r
+ p += 1\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ F(a)\r
+ if (a=1)\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in Arguments_ByReferenceA.vb")\r
+ end if\r
+ End Sub \r
+End Module\r
+\r
+'============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.4.0: If procedure is define by passing argument by reference and while calling the\r
+' procedure it is passes by giving parentheses around the variable then it protect\r
+' it from change \r
+'=============================================================================================\r
+\r
+Imports System\r
+Module APR_1_4_0\r
+ Sub F(ByRef p As Integer)\r
+ p += 1\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ F((a))\r
+ if(a<>1)\r
+ Throw new System.Exception ("#A1, Unexpected behavior in Arguments_ByReferenceB.vb")\r
+ end if\r
+ End Sub \r
+End Module\r
+\r
+'==============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.1.0: If variable elements is of value type, i.e. it contains only a value then procedure ' can change the variable or any of its members\r
+'=============================================================================================\r
+ \r
+Imports System\r
+Module APR_1_1_0\r
+ Sub F(ByRef p As String)\r
+ p = "Sinha"\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As String = "Manish"\r
+ F(a)\r
+ if (a="Manish")\r
+ Throw New System.Exception("#A1, Unexcepted behaviour of ByRef of String Datatype")\r
+ end if\r
+ End Sub \r
+End Module\r
+\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'==============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.3.0: If the variable elements is of reference type i.e. it contain a pointers to a class\r
+' then procedure can change the members of instance to which it points \r
+'==============================================================================================\r
+\r
+Imports System\r
+Imports System.Array\r
+Module APR_1_3_0\r
+\r
+ Public Sub Increase(ByRef A() As Long)\r
+ Dim J As Integer\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ End Sub\r
+ ' ...\r
+ Public Sub Replace(ByRef A() As Long)\r
+ Dim J As Integer\r
+ Dim K() As Long = {100, 200, 300,400}\r
+ A = K\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ End Sub\r
+ ' ...\r
+ \r
+ Sub Main()\r
+ Dim N() As Long = {10, 20, 30, 40}\r
+ Dim N1() As Long = {11, 21, 31, 41}\r
+ Dim N2() As Long = {101, 201, 301, 401}\r
+ Dim i As Integer\r
+ Increase(N)\r
+ For i = 0 to 3\r
+ if (N(i) <> N1(i))\r
+ Throw New System.Exception("#A1, Unexception Behaviour in Increase Function")\r
+ end if\r
+ Next i\r
+ Replace(N)\r
+ For i= 0 to 3\r
+ if ( N(i) <> N2(i))\r
+ Throw New System.Exception("#A2, Unexception Behaviour in Increase Function")\r
+ end if\r
+ Next i\r
+\r
+ End Sub \r
+End Module\r
+\r
+'==============================================================================================
\ No newline at end of file
--- /dev/null
+'==========================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.0.0: Argument Passing by value, which means the procedure cannot modify the variable\r
+' itself.\r
+'==========================================================================================\r
+Imports System\r
+Module APV1_0\r
+ Sub F(ByVal p As Integer)\r
+ p += 1\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ F(a)\r
+ if a<>1\r
+ Throw new System.Exception("#A1, Unexcepted behaviour")\r
+ end if\r
+ End Sub \r
+End Module\r
+'============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.4.0: By Default VB pass arguments by values, i.e if procedure is pass without mentioning\r
+' type then it take as ByVal type\r
+'=============================================================================================\r
+Imports System\r
+Module APV1_4_0\r
+ Sub F(p As Integer)\r
+ p += 1\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ F(a)\r
+ if a<>1\r
+ Throw new System.Exception("#A1, uncexcepted behaviour of Default VB pass arguments")\r
+ end if\r
+ End Sub \r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.1.0: If variable elements is of value type, i.e. it contains only a value then procedure ' cannot change the variable or any of its members\r
+'=============================================================================================\r
+\r
+Imports System\r
+Module APV1_1_0\r
+ Sub F(p As String)\r
+ p = "Sinha"\r
+ End Sub \r
+ \r
+ Sub Main()\r
+ Dim a As String = "Manish"\r
+ F(a)\r
+ if a<>"Manish"\r
+ Throw New System.Exception("#A1, Unexcepted behaviour in string of APV1_1_0")\r
+ end if\r
+ End Sub \r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.0.0: If the variable elements is of reference type i.e. it contain a pointers to a class\r
+' then procedure can change the members of instance to which it points \r
+'==============================================================================================\r
+\r
+Imports System\r
+Imports System.Array\r
+Module APV1_0\r
+\r
+ Public Sub Increase(ByVal A() As Long)\r
+ Dim J As Integer\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ End Sub\r
+ ' ...\r
+ Public Sub Replace(ByVal A() As Long)\r
+ Dim J As Integer\r
+ Dim K() As Long = {100, 200, 300, 400}\r
+ A = K\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ End Sub\r
+ ' ...\r
+ \r
+ Sub Main()\r
+ Dim N() As Long = {10, 20, 30, 40}\r
+ Dim N1() As Long = {11, 21, 31, 41}\r
+ Dim N2() As Long = {100, 200, 300, 400}\r
+ Dim i As Integer\r
+ Increase(N)\r
+ For i=0 To 3\r
+ if(N(i)<>N1(i))\r
+ Throw new System.Exception ("#A1, Unexpected behavior in Increase function")\r
+ end if\r
+ Next i\r
+ i=0 \r
+ Replace(N)\r
+ For i=0 To 3\r
+ if(N(i)=N2(i))\r
+ Throw new System.Exception ("#A2, Unexpected behavior in Replace function")\r
+ end if\r
+ Next i\r
+ End Sub \r
+End Module\r
+'============================================================================================
\ No newline at end of file
+2004-08-26 Anirban Bhattacharjee <banirban@novell.com>
+ Following tests are submtted by Manish Sinha <manishkumarsinha@sify.com>
+ * Arguments_ByValueA:
+ * Arguments_ByValueB:
+ * Arguments_ByValueC:
+ * Arguments_ByValueD:
+ * Arguments_ByReferenceA:
+ * Arguments_ByReferenceB:
+ * Arguments_ByReferenceC:
+ * Arguments_ByReferenceD:
+ * Function_ArguByValueA:
+ * Function_ArguByValueB:
+ * Function_ArguByValueC:
+ * Function_ArguByValueD:
+ * Function_ArguByReferenceA:
+ * Function_ArguByReferenceB:
+ * Function_ArguByReferenceC:
+ * Function_ArguByReferenceD:
+ * ParamArrayA:
+ * ParamArrayB:
+ * Function_ParamArrayA:
+ * Function_ParamArrayB:
+ * Function_ParamArrayc:
+ * ParamArrayC2:
+ * Function_ParamArrayC1:
+ * Function_ParamArrayC2:
+ * Function_ParamArrayC3:
+ * Function_ParamArrayC4i:
+ * Test.Sources: Included new test
+
2004-08-25 Sachin Kumar <skumar1@novell.com>
* ConditionalStatementsC.vb:
Added small test for nested Select Case Statement
--- /dev/null
+'==========================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.0.0: Argument Passing by Reference, which means the procedure can modify the variable\r
+' itself.\r
+'===========================================================================================\r
+\r
+Imports System\r
+Module APR_1_0_0\r
+ Function F(ByRef p As Integer) as Integer\r
+ p += 1\r
+ return p\r
+ End Function\r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ Dim b as Integer = 0\r
+ b=F(a)\r
+ if (b<>a)\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in Arguments_ByReferenceA.vb")\r
+ end if\r
+ End Sub \r
+End Module\r
+\r
+'============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.4.0: If procedure is define by passing argument by reference and while calling the\r
+' procedure it is passes by giving parentheses around the variable then it protect\r
+' it from change \r
+'=============================================================================================\r
+\r
+Imports System\r
+Module APR_1_4_0\r
+ Function F(ByRef p As Integer) as Integer\r
+ p += 1\r
+ return p\r
+ End Function \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ Dim b As Integer = 0\r
+ b=F((a))\r
+ if(b=a)\r
+ Throw new System.Exception ("#A1, Unexpected behavior in Arguments_ByReferenceB.vb")\r
+ end if\r
+ End Sub \r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.1.0: If variable elements is of value type, i.e. it contains only a value then procedure ' can change the variable or any of its members\r
+'=============================================================================================\r
+ \r
+Imports System\r
+Module APR_1_1_0\r
+ Function F(ByRef p As String) as String\r
+ p = "Sinha"\r
+ return p\r
+ End Function \r
+ \r
+ Sub Main()\r
+ Dim a As String = "Manish"\r
+ Dim b As String = ""\r
+ b=F(a)\r
+ if (b<>a)\r
+ Throw New System.Exception("#A1, Unexcepted behaviour of ByRef of String Datatype")\r
+ end if\r
+ End Sub \r
+End Module\r
+\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'==============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Reference:\r
+'APR-1.3.0: If the variable elements is of reference type i.e. it contain a pointers to a class\r
+' then procedure can change the members of instance to which it points \r
+'==============================================================================================\r
+\r
+Imports System\r
+Imports System.Array\r
+Module APR_1_3_0\r
+\r
+ Public Function Increase(ByRef A() As Long) As Long()\r
+ Dim J As Integer\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ return A\r
+ End Function\r
+ ' ...\r
+ Public Function Replace(ByRef A() As Long) As Long()\r
+ Dim J As Integer\r
+ Dim K() As Long = {100, 200, 300,400}\r
+ A = K\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ return A\r
+ End Function\r
+ ' ...\r
+ \r
+ Sub Main()\r
+ Dim N() As Long = {10, 20, 30, 40}\r
+ Dim N1(3) As Long\r
+ Dim N2(3) As Long \r
+ Dim i As Integer\r
+ N1=Increase(N)\r
+ For i = 0 to 3\r
+ if (N(i) <> N1(i))\r
+ Throw New System.Exception("#A1, Unexception Behaviour in Increase Function")\r
+ end if\r
+ Next i\r
+ N2=Replace(N)\r
+ For i= 0 to 3\r
+ if ( N(i) <> N2(i))\r
+ Throw New System.Exception("#A2, Unexception Behaviour in Increase Function")\r
+ end if\r
+ Next i\r
+\r
+ End Sub \r
+End Module\r
+\r
+'==============================================================================================
\ No newline at end of file
--- /dev/null
+'==========================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.0.0: Argument Passing by value, which means the procedure cannot modify the variable\r
+' itself.\r
+'==========================================================================================\r
+Imports System\r
+Module APV1_0\r
+ Function F(ByVal p As Integer) As Integer\r
+ p += 1\r
+ return p\r
+ End Function \r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ Dim b As Integer = 0 \r
+ b = F(a)\r
+ if b=a\r
+ Throw new System.Exception("#A1, Unexcepted behaviour")\r
+ end if\r
+ End Sub \r
+End Module\r
+'==========================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.4.0: By Default VB pass arguments by values, i.e if procedure is pass without mentioning\r
+' type then it take as ByVal type\r
+'=============================================================================================\r
+Imports System\r
+Module APV1_4_0\r
+ Function F(p As Integer) as Integer\r
+ p += 1\r
+ return p\r
+ End Function\r
+ \r
+ Sub Main()\r
+ Dim a As Integer = 1\r
+ Dim b as Integer = 0\r
+ b = F(a)\r
+ if b=a\r
+ Throw new System.Exception("#A1, uncexcepted behaviour of Default VB pass arguments")\r
+ end if\r
+ End Sub \r
+End Module\r
+'============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.1.0: If variable elements is of value type, i.e. it contains only a value then procedure ' cannot change the variable or any of its members\r
+'=============================================================================================\r
+\r
+Imports System\r
+Module APV1_1_0\r
+ Function F(p As String) As String\r
+ p = "Sinha"\r
+ return p\r
+ End Function\r
+ \r
+ Sub Main()\r
+ Dim a As String = "Manish"\r
+ Dim b as String = ""\r
+ b = F(a)\r
+ if a=b\r
+ Throw New System.Exception("#A1, Unexcepted behaviour in string of APV1_1_0")\r
+ end if\r
+ End Sub \r
+End Module\r
+'===========================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Argument passing by Value:\r
+'APV-1.0.0: If the variable elements is of reference type i.e. it contain a pointers to a class\r
+' then procedure can change the members of instance to which it points \r
+'==============================================================================================\r
+\r
+Imports System\r
+Imports System.Array\r
+Module APV1_0\r
+\r
+ Function Increase(ByVal A() As Long) As Long()\r
+ Dim J As Integer\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ return A\r
+ End Function\r
+ ' ...\r
+ Function Replace(ByVal A() As Long) As Long()\r
+ Dim J As Integer\r
+ Dim K() As Long = {100, 200, 300, 400}\r
+ A = K\r
+ For J = 0 To 3\r
+ A(J) = A(J) + 1\r
+ Next J\r
+ return A\r
+ End Function\r
+ ' ...\r
+ \r
+ Sub Main()\r
+ Dim N() As Long = {10, 20, 30, 40}\r
+ Dim N1() As Long = {0,0,0,0}\r
+ Dim N2(3) As Long \r
+ Dim i As Integer\r
+ N1=Increase(N)\r
+ For i=0 To 3\r
+ if(N(i)<>N1(i))\r
+ Throw new System.Exception ("#A1, Unexpected behavior in Increase function")\r
+ end if\r
+ Next i \r
+ N2=Replace(N)\r
+ For i=0 To 3\r
+ if(N(i)=N2(i))\r
+ Throw new System.Exception ("#A2, Unexpected behavior in Replace function")\r
+ end if\r
+ Next i\r
+ End Sub \r
+End Module\r
+'===========================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Param Array:\r
+'APR-1.2.1: If ParamArray modifier is precied by ByVal modifier the it produces doesn't\r
+' produces compiler error\r
+'============================================================================================\r
+Imports System\r
+Module PA_1_2_1\r
+ Function F(ParamArray ByVal args() As Integer)As Integer\r
+ Dim a as integer\r
+ a = args.Length\r
+ return a\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim b as Integer\r
+ b= F(a)\r
+ if b<>3\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")\r
+ end if\r
+\r
+ b = F(10, 20, 30, 40)\r
+ if b<>4\r
+ Throw New System.Exception("#A2, Unexcepted Behaviour in F(10,20,30,40)")\r
+ end if\r
+ b = F()\r
+ if b<>0\r
+ Throw New System.Exception("#A3, Unexcepted Behaviour in F()")\r
+ end if\r
+ End Sub\r
+End Module\r
+\r
+'============================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Function F(ParamArray args() As Integer)as Integer\r
+ Dim a as integer\r
+ a = args.Length\r
+ return a\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim b as Integer\r
+ b= F(a)\r
+ if b<>3\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")\r
+ end if\r
+\r
+ b = F(10, 20, 30, 40)\r
+ if b<>4\r
+ Throw New System.Exception("#A2, Unexcepted Behaviour in F(10,20,30,40)")\r
+ end if\r
+ b = F()\r
+ if b<>0\r
+ Throw New System.Exception("#A3, Unexcepted Behaviour in F()")\r
+ end if\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Function F(ByVal b as Integer ,ParamArray args() As Integer)as Boolean\r
+ Dim a as integer\r
+ a = args.Length\r
+ if a=b\r
+ return true\r
+ else \r
+ return false\r
+ end if\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim c as Integer\r
+ c = a.Length\r
+ Dim b as Boolean\r
+ b= F(c,a)\r
+ if b<>true\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")\r
+ end if\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Function F(ParamArray args() As Integer,ParamArray args1() As Integer)as Boolean\r
+ Dim a as integer\r
+ Dim b as integer\r
+ a = args.Length\r
+ b = args1.Length\r
+ if a<>b\r
+ return true\r
+ else \r
+ return false\r
+ end if\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim b As Integer() = { 1, 2, 3,4 }\r
+ Dim e as Boolean\r
+ e= F(a,b)\r
+ if e<>true\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a,b)")\r
+ end if\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Param Array:\r
+'APR-1.1.1:If ParamArray modifier is precied by ByRef modifier the it produces compiler error \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_1_1\r
+ Function F(ParamArray ByRef args() As Integer) As Integer()\r
+ Dim i As Integer\r
+ For Each i In args\r
+ Console.Write(" " & i)\r
+ Next i\r
+ Console.WriteLine()\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+\r
+ F(a)\r
+ F(10, 20, 30, 40)\r
+ F()\r
+ End Sub\r
+End Module\r
+'================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Function F(ParamArray args() As Integer, ByVal b as Integer)as Boolean\r
+ Dim a as integer\r
+ a = args.Length\r
+ if a=b\r
+ return true\r
+ else \r
+ return false\r
+ end if\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim c as Integer\r
+ c = a.Length\r
+ Dim b as Boolean\r
+ b= F(a,c)\r
+ if b<>true\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a,c)")\r
+ end if\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Function F(ParamArray args() As Integer,ParamArray args1() As Integer, ByVal a as Integer, ByVal b as Integer)as Boolean\r
+ Dim a as integer\r
+ Dim b as integer\r
+ a = args.Length\r
+ b = args1.Length\r
+ if a<>b\r
+ return true\r
+ else \r
+ return false\r
+ end if\r
+ End Function\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ Dim b As Integer() = { 1, 2, 3,4 }\r
+ Dim c as Integer = 0\r
+ Dim d as Integer = 0\r
+ c = a.Length\r
+ d = b.Length\r
+ Dim e as Boolean\r
+ e= F(a,b,c,d)\r
+ if e<>true\r
+ Throw New System.Exception("#A1, Unexcepted Behaviour in F(a)")\r
+ end if\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Param Array:\r
+'APR-1.2.1: If ParamArray modifier is precied by ByVal modifier the it produces doesn't\r
+' produces compiler error\r
+'============================================================================================\r
+Imports System\r
+Module PA_1_2_1\r
+ Sub F(ParamArray ByVal args() As Integer)\r
+ Dim a as Integer\r
+ a = args.Length\r
+ if a=0\r
+ Throw New System.Exception("#A1, Unexcepted behavoiur of PARAM ARRAY")\r
+ end if\r
+\r
+ End Sub\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ F(a)\r
+ F(10, 20, 30, 40)\r
+ End Sub\r
+End Module\r
+\r
+'=================================================================================
\ No newline at end of file
--- /dev/null
+'============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: ParamArray:\r
+'APR-1.0.0: ParamArray can be used only on the last argument of argument list. it allows us to 'pass an arbitrary list. It allows us to pass an arbitrary number of argument to the procedure \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_0_0\r
+ Sub F(ParamArray args() As Integer)\r
+ Dim a as Integer\r
+ a=args.Length\r
+ if a=0\r
+ Throw New System.Exception("#A1, Unexcepted behavoiur of PARAM ARRAY")\r
+ end if\r
+ End Sub\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ F(a)\r
+ F(10, 20, 30, 40)\r
+ End Sub\r
+End Module\r
+'=============================================================================================
\ No newline at end of file
--- /dev/null
+'=============================================================================================\r
+'Name:Manish Kumar Sinha \r
+'Email Address: manishkumarsinha@sify.com\r
+'Test Case Name: Param Array:\r
+'APR-1.1.1:If ParamArray modifier is precied by ByRef modifier the it produces compiler error \r
+'=============================================================================================\r
+Imports System\r
+Module PA_1_1_1\r
+ Sub F(ParamArray ByRef args() As Integer)\r
+ Dim a as Integer\r
+ a = args.Length\r
+ if a=0\r
+ Throw New System.Exception("#A1, Unexcepted behavoiur of PARAM ARRAY")\r
+ end if\r
+\r
+ End Sub\r
+ Sub Main()\r
+ Dim a As Integer() = { 1, 2, 3 }\r
+ F(a)\r
+ F(10, 20, 30, 40)\r
+ End Sub\r
+End Module\r
+'================================================================================
\ No newline at end of file
#
TEST_SOURCES = \
+NameSpaceTest\* \
LabelA \
LabelB \
LabelC \
EventG \
EventH \
Event_exe \
+Arguments_ByValueA \
+Arguments_ByValueB \
+Arguments_ByValueC \
+Arguments_ByValueD \
+Arguments_ByReferenceA \
+Arguments_ByReferenceB \
+Arguments_ByReferenceC \
+Arguments_ByReferenceD \
+Function_ArguByValueA \
+Function_ArguByValueB \
+Function_ArguByValueC \
+Function_ArguByValueD \
+Function_ArguByReferenceA \
+Function_ArguByReferenceB \
+Function_ArguByReferenceC \
+Function_ArguByReferenceD \
+ParamArrayA \
+ParamArrayB \
+Function_ParamArrayA \
+Function_ParamArrayB \
+Function_ParamArrayc \
AssignmentOperators \
RelationalOperators \
RelationalOperatorsA \
PropertyC11 \
DelegateC1 \
DelegateC2 \
+ParamArrayC2 \
+Function_ParamArrayC1 \
+Function_ParamArrayC2 \
+Function_ParamArrayC3 \
+Function_ParamArrayC4 \
ConcatenationOperatorC1 \
LogicalOperatorsC1 \
LogicalOperatorsC2 \