@@ -393,7 +393,10 @@ static bool test_sxbp_load_spiral(void) {
393393 }
394394 // build expected output struct
395395 sxbp_spiral_t expected = {
396- .size = 16 , .solved_count = 5 , .seconds_spent = 3125 ,
396+ .size = 16 ,
397+ .solved_count = 5 ,
398+ .seconds_spent = 3125 ,
399+ .seconds_accuracy = 1 ,
397400 };
398401 expected .lines = calloc (sizeof (sxbp_line_t ), 16 );
399402 sxbp_direction_t directions [16 ] = {
@@ -419,6 +422,8 @@ static bool test_sxbp_load_spiral(void) {
419422 result = false;
420423 } else if (output .seconds_spent != expected .seconds_spent ) {
421424 result = false;
425+ } else if (output .seconds_accuracy != expected .seconds_accuracy ) {
426+ result = false;
422427 } else {
423428 // compare with expected struct
424429 for (uint8_t i = 0 ; i < 16 ; i ++ ) {
@@ -593,6 +598,7 @@ static bool test_sxbp_dump_spiral(void) {
593598 .size = 16 ,
594599 .solved_count = 5 ,
595600 .seconds_spent = 3125 ,
601+ .seconds_accuracy = 1 ,
596602 };
597603 input .lines = calloc (sizeof (sxbp_line_t ), 16 );
598604 sxbp_direction_t directions [16 ] = {
@@ -629,7 +635,7 @@ static bool test_sxbp_dump_spiral(void) {
629635 0 , 0 , 0 , 16 , // size
630636 0 , 0 , 0 , 5 , // solved count
631637 0 , 0 , 12 , 53 , // seconds spent
632- 0 , 0 , 0 , 0 // seconds accuracy - TODO: Change to something to test
638+ 0 , 0 , 0 , 1 // seconds accuracy - TODO: Change to something to test
633639 );
634640 // construct expected data section
635641 uint8_t data [64 ] = {
0 commit comments