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