branch | transitional_engine |
changeset 16021 | 6a3dc15b78b9 |
16009:7544a7d7c819 | 16021:6a3dc15b78b9 |
---|---|
1 #include "rust-lib.h" |
|
2 #include <cassert> |
|
3 |
|
4 int main(int argc, char **argv) { |
|
5 assert(is_magic_number(MAGIC_NUMBER)); |
|
6 struct Point p1, p2; |
|
7 p1.x = 54; |
|
8 p2.x = 46; |
|
9 p1.y = 34; |
|
10 p2.y = 66; |
|
11 add_point(&p1, &p2); |
|
12 assert(p1.x == 100); |
|
13 assert(p2.x == 46); |
|
14 assert(p1.y == 100); |
|
15 assert(p2.y == 66); |
|
16 add_point(&p1, NULL); |
|
17 assert(p1.x == 100); |
|
18 assert(p1.y == 100); |
|
19 } |