diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/structured-compare.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/run-pass/structured-compare.rs b/src/test/run-pass/structured-compare.rs new file mode 100644 index 00000000..fed4b183 --- /dev/null +++ b/src/test/run-pass/structured-compare.rs @@ -0,0 +1,20 @@ +tag foo { + large; + small; +} + +fn main() { + auto a = tup(1,2,3); + auto b = tup(1,2,3); + check (a == b); + check (a != tup(1,2,4)); + check (a < tup(1,2,4)); + check (a <= tup(1,2,4)); + check (tup(1,2,4) > a); + check (tup(1,2,4) >= a); + auto x = large; + auto y = small; + check (x != y); + check (x == large); + check (x != small); +}
\ No newline at end of file |