bug_char.rs revision 648a1c137663ef7207684d0d7009dd5518942111
1#include "shared.rsh" 2 3char rand_sc1_0, rand_sc1_1; 4char2 rand_sc2_0, rand_sc2_1; 5 6char min_rand_sc1_sc1; 7char2 min_rand_sc2_sc2; 8 9static bool test_bug_char() { 10 bool failed = false; 11 12 rsDebug("rand_sc2_0.x: ", rand_sc2_0.x); 13 rsDebug("rand_sc2_0.y: ", rand_sc2_0.y); 14 rsDebug("rand_sc2_1.x: ", rand_sc2_1.x); 15 rsDebug("rand_sc2_1.y: ", rand_sc2_1.y); 16 char temp_sc1; 17 char2 temp_sc2; 18 19 temp_sc1 = min( rand_sc1_0, rand_sc1_1 ); 20 if (temp_sc1 != min_rand_sc1_sc1) { 21 rsDebug("temp_sc1", temp_sc1); 22 failed = true; 23 } 24 rsDebug("broken", 'y'); 25 26 temp_sc2 = min( rand_sc2_0, rand_sc2_1 ); 27 if (temp_sc2.x != min_rand_sc2_sc2.x 28 || temp_sc2.y != min_rand_sc2_sc2.y) { 29 failed = true; 30 } 31 32 33 return failed; 34} 35 36void bug_char_test() { 37 bool failed = false; 38 failed |= test_bug_char(); 39 40 if (failed) { 41 rsSendToClientBlocking(RS_MSG_TEST_FAILED); 42 } 43 else { 44 rsSendToClientBlocking(RS_MSG_TEST_PASSED); 45 } 46} 47 48