From f34c820c659d4302841fc755d8b169e7e225ae1e Mon Sep 17 00:00:00 2001 From: fiatcode Date: Tue, 10 Feb 2026 11:37:52 +0700 Subject: [PATCH] RED: test one spare --- test/bowling_game_test.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/bowling_game_test.dart b/test/bowling_game_test.dart index 870b869..c278f51 100644 --- a/test/bowling_game_test.dart +++ b/test/bowling_game_test.dart @@ -24,5 +24,14 @@ void main() { rollMany(20, 1); expect(game.score(), 20); }); + + test('one spare', () { + game.roll(5); + game.roll(5); // spare + game.roll(3); // bonus for spare + rollMany(17, 0); // rest are gutter balls + + expect(game.score(), 16); // 10 (spare) + 3 (bonus) + 3 (normal roll) + }); }); }