2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / ImpConversionBoolToDoubleA1.vb
index bb070ab90e5988e5ff596128fc1ee89c6c834928..8304c49782211079cda60098960608a5cb2c0d7a 100644 (file)
@@ -1,17 +1,9 @@
-Imports System\r
-Imports System.Console\r
-Module AssignmentStatements1\r
-   Sub main()\r
-\r
-       Dim o As Boolean= True      \r
-       Try\r
-        Dim a As Double = o\r
-       Console.WriteLine(a.GetType().ToString() & " = " & a)\r
-       Catch e As System.Exception\r
-\r
-WriteLine("Runtime Exception occured-->See Stack traces below.....")\r
-WriteLine ("Runtime exception-->" &e.GetType.Name)\r
-WriteLine(e)\r
-End Try\r
-    End Sub\r
-End Module
\ No newline at end of file
+Module ImpConversionofBooltoDoubleB
+       Sub Main()
+               Dim b as Boolean = False
+               Dim a as Double = b
+               if a <> 0 then 
+                       Throw New System.Exception("Implicit Conversion of Bool(False) to Double has Failed. Expected 0, but got " & a)
+               End if          
+       End Sub
+End Module