|
Revision 2636, 1.1 KB
(checked in by Charles.Esterbrook, 7 weeks ago)
|
|
JVM back-end progress.
credit:hopscc
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | #.require. clr |
|---|
| 2 | namespace Test |
|---|
| 3 | |
|---|
| 4 | class Test |
|---|
| 5 | |
|---|
| 6 | def main |
|---|
| 7 | is shared |
|---|
| 8 | |
|---|
| 9 | # string lits make for good tests |
|---|
| 10 | assert 'aoeu' inherits String # .warning. always |
|---|
| 11 | # Another Mono bug. New 1.2.6 (or maybe 1.2.5): https://bugzilla.novell.com/show_bug.cgi?id=350977 |
|---|
| 12 | # assert 'aoeu' inherits Object # .wa rning. always |
|---|
| 13 | assert not ('aoeu' inherits Version) # .warning. never |
|---|
| 14 | assert not ('aoeu' inherits int) # .warning. never |
|---|
| 15 | |
|---|
| 16 | # primitives |
|---|
| 17 | assert 5 inherits int # .warning. always |
|---|
| 18 | assert 5 inherits Object # .warning. always |
|---|
| 19 | assert not (5 inherits String) # .warning. never |
|---|
| 20 | |
|---|
| 21 | assert true inherits bool # .warning. always |
|---|
| 22 | assert true inherits Object # .warning. always |
|---|
| 23 | assert not (true inherits String) # .warning. never |
|---|
| 24 | |
|---|
| 25 | # try a method |
|---|
| 26 | assert Environment.getEnvironmentVariable('PATH') inherits Object # .warning. can just check for not nil |
|---|
| 27 | assert Environment.getEnvironmentVariable('PATH') inherits String # .warning. can just check for not nil |
|---|
| 28 | assert not (Environment.getEnvironmentVariable('PATH') inherits Version) # .warning. never |
|---|