[Mono-vb] Few more test cases

Anony Mous Anon21h@yahoo.co.uk
Sun, 25 Jan 2004 16:33:41 +0000


Hi Anirban,

If mbas supports conditional compilation, we can use it to implement 
your idea as follows:

     #If STRICT Then
       Option Strict On
     #Else
       Option Strict Off
     #End If

     Module CharacterLiterals1
         Sub Main()
             Dim c As Char

     #If STRICT Then
       	    c = "x"c	
     #Else
        	    c = "x"
     #End If
     	
             Dim a As String = "X"c
             If a <> c Then
                 Throw New System.Exception("a is not same as c")
             End If
         End Sub
     End Module

and then use some kind of batch file to run the compilation with
the STRICT conditional compilation constant defined in one run and 
undefined in another run.

Sound good?

Cheers,
Eric.

B Anirban wrote:
> Hi Eric,
> Even I also thought of this scenario.
> And this is the first thing came to my mind.
> But, I am still in lookout for a better way to check this scenario.
> May be we can alter the make file a little bit which will open all the
> positive test files put a Option explicit statement on top and then
> after compilation omit that. This will reduce the effort significantly.
> Any one has a better suggestion are welcome.
> Thanks.
> Anirban.
> 
> 
> 
>>>>Anony Mous <Anon21h@yahoo.co.uk> 25-Jan-04 4:45:07 PM >>>
>>>
> Hi All,
> 
> Its been a while since I looked at mbas but its great to see work is 
> still progressing. I just wanted to suggest that we develop two sets of
> 
> test cases for each behaviour we are trying to test. One set is for 
> "Option Strict On" and the other should be for "Option Strict Off".
> This is for scenarios like with the character literals test (see
> below)
> where it would compile with "Option Strict Off" but not with "Option 
> Strict On".
> 
> Cheers,
> Eric.
> 
> ----------------------------------------------------------------
> A Rafael D Teixeira wrote:
> 
>>On Fri, 2004-01-23 at 13:57, B Anirban wrote:
>>
>>
>>>Hi Rafael,
>>
>>
>>Hi Anirban,
>>
>>
>>
>>>Today I have added few more test cases under btests.
>>
>>
>>Good,
>>
>>
>>
>>>During check-in I realized that last time The Test.Sources file
>>
> didn't
> 
>>>get checked-in for some reason (my be I missed to add that in cvs).
>>>Anyways, I found that you already placed one in place.
>>>Today I added my Test.Sources file in place.
>>>Please let me know if you have any concern with the file. In that
>>
> case
> 
>>>we can revert back to your file.
>>
>>
>>The Test.Sources is OK; but we have problems with some of the source
>>files, for instance:
>>
>>CharacterLiterals1.vb
>>---------------------
>>
>>Module CharacterLiterals1
>>    Sub Main()
>>        Dim c As Char
>>        c = "x"
>> 
>>        Dim a As String = "X"c
>>        If a <> c Then
>>            Throw New System.Exception("a is not same as c")
>>        End If
>>    End Sub
>>End Module
>>
>>Won't compile I corrected it to 
>>
>>Module CharacterLiterals1
>>    Sub Main()
>>        Dim c As Char
>>        c = "x"c
>>        Dim a As String = "X"
>>        If a <> c Then
>>            Throw New System.Exception("a is not same as c")
>>        End If
>>    End Sub
>>End Module
>>
>>Already in CVS.
>>
>>
>>
>>>Looking forward for your comments.
>>
>>
>>>From looking briefly at the results file, I think other sources
> 
> contain
> 
>>such errors, I recommend you to always compile with MS vbc in
> 
> Windows,
> 
>>before committing sources to cvs. If that is not possible,
> 
> double-check
> 
>>your coding with the syntax documentation in MSDN and try to
> 
> understand
> 
>>what mbas is saying about the files, to figure if it is a mbas
> 
> problem
> 
>>or a source problem.
>>
>>
>>
>>>Regards.
>>>Anirban.
>>
>>
>>>From the lookout, we have plenty of work ahead of us...
>>
>>Thanks Anirban,
>>
> 
> 
> 
> _______________________________________________
> Mono-vb mailing list
> Mono-vb@lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-vb
>