2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
|
|
|
type point = rec(int x, int y);
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let point origin = rec(x=0, y=0);
|
|
|
|
|
|
|
|
let point right = rec(x=origin.x + 10 with origin);
|
|
|
|
let point up = rec(y=origin.y + 10 with origin);
|
|
|
|
|
2011-05-02 18:24:09 -05:00
|
|
|
check(origin.x == 0);
|
|
|
|
check(origin.y == 0);
|
2010-06-23 23:03:09 -05:00
|
|
|
|
2011-05-02 18:24:09 -05:00
|
|
|
check(right.x == 10);
|
|
|
|
check(right.y == 0);
|
2010-06-23 23:03:09 -05:00
|
|
|
|
2011-05-02 18:24:09 -05:00
|
|
|
check(up.x == 0);
|
|
|
|
check(up.y == 10);
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|