16050
|
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);
|
16067
|
19 |
|
|
20 |
assert(OTHER_MOD_MAGIC_NUMBER == 192312312);
|
|
21 |
assert(FFI_MAGIC_NUMBER == 0xFDA00184);
|
16050
|
22 |
}
|