Sub Tests
'Expected output:
' - All tests should return true, meaning the result is as expected.
'Test String in String()
Log("01: " & (True == PyIn("world", Array As String("hello", "world"))))
Log("02: " & (False == PyIn("world", Array As String("hello", "universe"))))
'Test Char in Char()
Dim c As Char = "w"
Log("03: " & (True == PyIn(c, Array As Char("h", "w"))))
Log("04: " & (False == PyIn(c, Array As Char("h", "x"))))
'Test Char in String()
Log("05: " & (True == PyIn(c, Array As String("h", "w"))))
Log("06: " & (False == PyIn(c, Array As String("h", "x"))))
'Test String in Char()
Log("07: " & (True == PyIn("w", Array As Char("h", "w"))))
Log("08: " & (False == PyIn("w", Array As Char("h", "x"))))
'Test Object in Object()
Dim x As Object
Dim y As Object
Dim z As Object = Array As Object(x)
Log("09: " & (True == PyIn(x, z)))
Log("10: " & (False == PyIn(y, z)))
'Test Byte in Byte()
Dim b As Byte = 5
Log("11: " & (True == PyIn(b, Array As Byte(3, 5))))
Log("12: " & (False == PyIn(b, Array As Byte(3, 6))))
'Test Int in Int()
Dim i As Int = 5
Log("13: " & (True == PyIn(i, Array As Int(3, 5))))
Log("14: " & (False == PyIn(i, Array As Int(3, 6))))
'Test Float in Float()
Dim f As Float = 5.0
Log("15: " & (True == PyIn(f, Array As Float(3, 5))))
Log("16: " & (False == PyIn(f, Array As Float(3, 6))))
'Test Double in Double()
Dim d As Double = 5.0
Log("17: " & (True == PyIn(d, Array As Double(3, 5))))
Log("18: " & (False == PyIn(d, Array As Double(3, 6))))
'Test Long in Long()
Dim j As Long = 5
Log("19: " & (True == PyIn(j, Array As Long(3, 5))))
Log("20: " & (False == PyIn(j, Array As Long(3, 6))))
'Test Short in Short()
Dim s As Short = 5
Log("21: " & (True == PyIn(s, Array As Short(3, 5))))
Log("22: " & (False == PyIn(s, Array As Short(3, 6))))
'Test something in String (incomplete number of test cases)
Log("23: " & (True == PyIn(s, "358")))
Log("24: " & (False == PyIn(s, "378")))
'Test something in List (incomplete number of test cases)
Dim lst As List
lst.Initialize
lst.Add(x)
lst.add("5")
lst.add(5)
lst.add(b)
Log("25: " & (True == PyIn(b, lst)))
Log("26: " & (False == PyIn(s, lst)))
lst.add(s)
Log("27: " & (True == PyIn(s, lst)))
'Test something in Map (incomplete number of test cases)
Dim map As Map
map.Initialize
map.Put(j, "long")
Log("28: " & (True == PyIn(j, map)))
Log("29: " & (False == PyIn(d, map)))
map.Put(d, "double")
Log("30: " & (True == PyIn(d, map)))
End Sub