Author: sudha
Date: 2005-03-18 08:37:44 -0500 (Fri, 18 Mar 2005)
New Revision: 41982
Added:
trunk/mcs/mbas/Test/tests/LikeOperatorD.vb
trunk/mcs/mbas/Test/tests/LikeOperatorE.vb
trunk/mcs/mbas/Test/tests/LikeOperatorF.vb
trunk/mcs/mbas/Test/tests/LikeOperatorG.vb
Log:
Few more test cases for Like operator
Added: trunk/mcs/mbas/Test/tests/LikeOperatorD.vb
===================================================================
--- trunk/mcs/mbas/Test/tests/LikeOperatorD.vb 2005-03-18 13:32:27 UTC (rev
41981)
+++ trunk/mcs/mbas/Test/tests/LikeOperatorD.vb 2005-03-18 13:37:44 UTC (rev
41982)
@@ -0,0 +1,36 @@
+'Author:
+' K. Satya Sudha ([EMAIL PROTECTED])
+'
+' (C) 2005 Novell, Inc.
+
+Imports System
+Module Test
+ Sub Main()
+ Dim a As Boolean = "7" Like "?[]"
+ if a <> true then
+ throw new Exception ("#A1 - Like operator failed")
+ end if
+
+ a = "7" Like "[]?"
+ if a <> true then
+ throw new Exception ("#A2 - Like operator failed")
+ end if
+
+ a = "7" Like "[]*"
+ if a <> true then
+ throw new Exception ("#A3 - Like operator failed")
+ end if
+
+ a = "7" Like "[]#"
+ if a <> true then
+ throw new Exception ("#A4 - Like operator failed")
+ end if
+
+ a = "7" Like "#[]"
+ if a <> true then
+ throw new Exception ("#A5 - Like operator failed")
+ end if
+
+ End Sub
+End Module
+
Added: trunk/mcs/mbas/Test/tests/LikeOperatorE.vb
===================================================================
--- trunk/mcs/mbas/Test/tests/LikeOperatorE.vb 2005-03-18 13:32:27 UTC (rev
41981)
+++ trunk/mcs/mbas/Test/tests/LikeOperatorE.vb 2005-03-18 13:37:44 UTC (rev
41982)
@@ -0,0 +1,46 @@
+'Author:
+' K. Satya Sudha ([EMAIL PROTECTED])
+'
+' (C) 2005 Novell, Inc.
+
+Imports System
+Module Test
+ Sub Main()
+ Dim a As Boolean = "7" Like "[!0-6]"
+ if a <> true then
+ throw new Exception ("#A1 - Like operator failed")
+ end if
+
+ a = "7" Like "[][!0-6][]"
+ if a <> true then
+ throw new Exception ("#A2 - Like operator failed")
+ end if
+
+ a = "7" Like "[][!06][]"
+ if a <> true then
+ throw new Exception ("#A3 - Like operator failed")
+ end if
+
+ a = "6" Like "[][0-6!8-9][]"
+ if a <> true then
+ throw new Exception ("#A4 - Like operator failed")
+ end if
+
+ a = "67" Like "[!0-58-9][567]"
+ if a <> true then
+ throw new Exception ("#A5 - Like operator failed")
+ end if
+
+ a = "7" Like "[0-5!]"
+ if a <> true then
+ throw new Exception ("#A6 - Like operator failed")
+ end if
+
+ a = "6" Like "[][0-6!8-9][]"
+ if a <> true then
+ throw new Exception ("#A7 - Like operator failed")
+ end if
+
+ End Sub
+End Module
+
Added: trunk/mcs/mbas/Test/tests/LikeOperatorF.vb
===================================================================
--- trunk/mcs/mbas/Test/tests/LikeOperatorF.vb 2005-03-18 13:32:27 UTC (rev
41981)
+++ trunk/mcs/mbas/Test/tests/LikeOperatorF.vb 2005-03-18 13:37:44 UTC (rev
41982)
@@ -0,0 +1,46 @@
+'Author:
+' K. Satya Sudha ([EMAIL PROTECTED])
+'
+' (C) 2005 Novell, Inc.
+
+Imports System
+Module Test
+ Sub Main()
+ Dim a As Boolean = "c" Like "[abc6!0-58-9]"
+ if a <> true then
+ throw new Exception ("#A1 - Like operator failed")
+ end if
+
+ a = "5" Like "[abc0-4def8-9!]"
+ if a <> true then
+ throw new Exception ("#A2 - Like operator failed")
+ end if
+
+ a = "5" Like "[!abc0-4def8-9]"
+ if a <> true then
+ throw new Exception ("#A3 - Like operator failed")
+ end if
+
+ a = "e" Like "[a-f!567o-z]"
+ if a <> true then
+ throw new Exception ("#A4 - Like operator failed")
+ end if
+
+ a = "p" Like "[a-f!567o-z]"
+ if a <> false then
+ throw new Exception ("#A5 - Like operator failed")
+ end if
+
+ a = "d" Like "[a-c-e-g]"
+ if a <> false then
+ throw new Exception ("#A6 - Like operator failed")
+ end if
+
+ a = "b" Like "[a-c-e-g]"
+ if a <> true then
+ throw new Exception ("#A7 - Like operator failed")
+ end if
+
+ End Sub
+End Module
+
Added: trunk/mcs/mbas/Test/tests/LikeOperatorG.vb
===================================================================
--- trunk/mcs/mbas/Test/tests/LikeOperatorG.vb 2005-03-18 13:32:27 UTC (rev
41981)
+++ trunk/mcs/mbas/Test/tests/LikeOperatorG.vb 2005-03-18 13:37:44 UTC (rev
41982)
@@ -0,0 +1,91 @@
+'Author:
+' K. Satya Sudha ([EMAIL PROTECTED])
+'
+' (C) 2005 Novell, Inc.
+
+Imports System
+Module Test
+ Sub Main()
+ Dim a As Boolean = "7" Like "[][!!][]"
+ if a <> true then
+ throw new Exception ("#A1 - Like operator failed")
+ end if
+
+ a = "7" Like "[][!-][]"
+ if a <> true then
+ throw new Exception ("#A2 - Like operator failed")
+ end if
+
+ a = "d" Like "[abc!def]"
+ if a <> false then
+ throw new Exception ("#A3 - Like operator failed")
+ end if
+
+ a = "r" Like "[!-*]"
+ if a <> true then
+ throw new Exception ("#A4 - Like operator failed")
+ end if
+
+ a = "-" Like "[!-*]"
+ if a <> false then
+ throw new Exception ("#A5 - Like operator failed")
+ end if
+
+ a = "*" Like "[!-*]"
+ if a <> false then
+ throw new Exception ("#A6 - Like operator failed")
+ end if
+
+ a = "%" Like "[!#--D]"
+ if a <> false then
+ throw new Exception ("#A7 - Like operator failed")
+ end if
+
+ a = "A" Like "[?-D]"
+ if a <> true then
+ throw new Exception ("#A8 - Like operator failed")
+ end if
+
+ a = "-" Like "[?-D]"
+ if a <> false then
+ throw new Exception ("#A9 - Like operator failed")
+ end if
+
+ a = "-" Like "[--D]"
+ if a <> true then
+ throw new Exception ("#A10 - Like operator failed")
+ end if
+
+ a = "0" Like "[--D]"
+ if a <> true then
+ throw new Exception ("#A11 - Like operator failed")
+ end if
+
+ a = "+" Like "[*--D]"
+ if a <> true then
+ throw new Exception ("#A12 - Like operator failed")
+ end if
+
+ a = "[" Like "[[-a]"
+ if a <> true then
+ throw new Exception ("#A13 - Like operator failed")
+ end if
+
+ a = "-" Like "[a-c-e]"
+ if a <> true then
+ throw new Exception ("#A14 - Like operator failed")
+ end if
+
+ a = "d" Like "[a-c-e]"
+ if a <> false then
+ throw new Exception ("#A15 - Like operator failed")
+ end if
+
+ a = "b" Like "[a-c-e]"
+ if a <> true then
+ throw new Exception ("#A16 - Like operator failed")
+ end if
+
+ End Sub
+End Module
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches