aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/structured-compare.rs
blob: fed4b1837303a8345898820847cfa0d833d5248f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}