Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LI Qi
Bowling
Commits
7823a4d7
Commit
7823a4d7
authored
Feb 06, 2016
by
Qi LI
Browse files
test the end of a game
parent
570741b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/TestScoreTable.java
View file @
7823a4d7
...
...
@@ -134,4 +134,21 @@ public class TestScoreTable {
Assert
.
assertArrayEquals
(
expected
,
actual
);
}
@Test
public
void
testCase9
()
{
ScoreTable
table
=
new
ScoreTable
();
int
[]
points
=
{
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
10
,
8
,
2
,
9
};
boolean
[]
expected
=
new
boolean
[
points
.
length
];
boolean
[]
actual
=
new
boolean
[
points
.
length
];
for
(
int
i
=
0
;
i
<
points
.
length
;
++
i
)
{
table
.
enterPoint
(
points
[
i
]);
expected
[
i
]
=
false
;
actual
[
i
]
=
table
.
isComplete
();
}
expected
[
expected
.
length
-
1
]
=
true
;
Assert
.
assertArrayEquals
(
expected
,
actual
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment