blob: 1cd728e927485b6c5827e41392804c747bd8229f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "shared.rsh"
typedef struct Point2 {
int x;
int y;
} Point_2;
Point_2 *point2;
static bool test_Point_2(int expected) {
bool failed = false;
rsDebug("Point: ", point2[0].x, point2[0].y);
_RS_ASSERT(point2[0].x == expected);
_RS_ASSERT(point2[0].y == expected);
if (failed) {
rsDebug("test_Point_2 FAILED", 0);
}
else {
rsDebug("test_Point_2 PASSED", 0);
}
return failed;
}
void struct_test(int expected) {
bool failed = false;
failed |= test_Point_2(expected);
if (failed) {
rsSendToClientBlocking(RS_MSG_TEST_FAILED);
}
else {
rsSendToClientBlocking(RS_MSG_TEST_PASSED);
}
}
|