diff options
| author | Graydon Hoare <[email protected]> | 2011-03-09 20:14:19 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-09 20:14:19 -0800 |
| commit | 8e8c336f93becbc394b99e978cc3d8145e7e9d7c (patch) | |
| tree | b08227e7d271db47d1b428bd0a31a3c736718b04 /src/test/run-pass | |
| parent | Un-XFAIL a couple export-related tests. (diff) | |
| download | rust-8e8c336f93becbc394b99e978cc3d8145e7e9d7c.tar.xz rust-8e8c336f93becbc394b99e978cc3d8145e7e9d7c.zip | |
Implement deep structural comparison through boxes and sequences.
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/box-compare.rs | 5 | ||||
| -rw-r--r-- | src/test/run-pass/seq-compare.rs | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/test/run-pass/box-compare.rs b/src/test/run-pass/box-compare.rs new file mode 100644 index 00000000..5115d510 --- /dev/null +++ b/src/test/run-pass/box-compare.rs @@ -0,0 +1,5 @@ +fn main() { + check (@1 < @3); + check (@@"hello " > @@"hello"); + check (@@@"hello" != @@@"there"); +}
\ No newline at end of file diff --git a/src/test/run-pass/seq-compare.rs b/src/test/run-pass/seq-compare.rs new file mode 100644 index 00000000..b3fe5701 --- /dev/null +++ b/src/test/run-pass/seq-compare.rs @@ -0,0 +1,15 @@ +fn main() { + check ("hello" < "hellr"); + check ("hello " > "hello"); + check ("hello" != "there"); + + check (vec(1,2,3,4) > vec(1,2,3)); + check (vec(1,2,3) < vec(1,2,3,4)); + check (vec(1,2,4,4) > vec(1,2,3,4)); + check (vec(1,2,3,4) < vec(1,2,4,4)); + check (vec(1,2,3) <= vec(1,2,3)); + check (vec(1,2,3) <= vec(1,2,3,3)); + check (vec(1,2,3,4) > vec(1,2,3)); + check (vec(1,2,3) == vec(1,2,3)); + check (vec(1,2,3) != vec(1,1,3)); +}
\ No newline at end of file |