#.require. clr namespace Test class Test def main is shared # string lits make for good tests assert 'aoeu' inherits String # .warning. always # Another Mono bug. New 1.2.6 (or maybe 1.2.5): https://bugzilla.novell.com/show_bug.cgi?id=350977 # assert 'aoeu' inherits Object # .wa rning. always assert not ('aoeu' inherits Version) # .warning. never assert not ('aoeu' inherits int) # .warning. never # primitives assert 5 inherits int # .warning. always assert 5 inherits Object # .warning. always assert not (5 inherits String) # .warning. never assert true inherits bool # .warning. always assert true inherits Object # .warning. always assert not (true inherits String) # .warning. never # try a method assert Environment.getEnvironmentVariable('PATH') inherits Object # .warning. can just check for not nil assert Environment.getEnvironmentVariable('PATH') inherits String # .warning. can just check for not nil assert not (Environment.getEnvironmentVariable('PATH') inherits Version) # .warning. never