Ejemplo n.º 1
0
static void test_single_strike( void){
   bowling_game_init();
   roll_once(10);
   roll_once(5);
   roll_once(2);
   roll_many(16,0);
   assert(bowling_game_score() == 24 && "Test Failed: single_strike");
}
Ejemplo n.º 2
0
static void test_single_spare( void){
   bowling_game_init();
   roll_once(5);
   roll_once(5);
   roll_once(5);
   roll_many(17,0);
   assert(bowling_game_score() == 20 && "Test Failed: single_spare");
}
Ejemplo n.º 3
0
void
setUp(void)
{
    bowling_game_init();
}
Ejemplo n.º 4
0
static void test_gutter_game( void){
   bowling_game_init();
   roll_many(20, 0);
   assert(bowling_game_score() == 0 && "Test Failed: gutter_game");
}
Ejemplo n.º 5
0
static void test_perfect_game( void){
   bowling_game_init();
   roll_many(12,10);
   assert(bowling_game_score() == 300 && "Test Failed: perfect_game");
}