Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
project02
Commits
b390aa7d
Commit
b390aa7d
authored
6 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Revert "Merge branch 'jkarras' into 'master'"
This reverts merge request
!3
parent
b35e36b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/edu/caltech/cs2/project02/GuesserTests.java
+2
-2
tests/edu/caltech/cs2/project02/GuesserTests.java
with
2 additions
and
2 deletions
+2
-2
tests/edu/caltech/cs2/project02/GuesserTests.java
View file @
b390aa7d
...
...
@@ -88,7 +88,7 @@ public class GuesserTests {
@Test
public
void
testMakeGuessExceptionsInRandom
()
{
Constructor
c
=
Reflection
.
getConstructor
(
RandomHangmanChooser
.
class
,
int
.
class
,
int
.
class
);
RandomHangmanChooser
chooser
=
Reflection
.
newInstance
(
c
,
3
,
1
);
RandomHangmanChooser
chooser
=
Reflection
.
newInstance
(
c
,
1
,
1
);
Method
m
=
Reflection
.
getMethod
(
RandomHangmanChooser
.
class
,
"makeGuess"
,
char
.
class
);
IntStream
.
range
(
0
,
20
).
forEach
(
i
->
assertThrows
(
IllegalArgumentException
.
class
,
()
->
m
.
invoke
(
chooser
,
(
char
)
(
'a'
-
(
i
+
1
)))));
IntStream
.
range
(
0
,
20
).
forEach
(
i
->
assertThrows
(
IllegalArgumentException
.
class
,
()
->
m
.
invoke
(
chooser
,
(
char
)
(
'z'
+
(
i
+
1
)))));
...
...
@@ -204,7 +204,7 @@ public class GuesserTests {
@Test
public
void
testMakeGuessExceptionsInEvil
()
{
Constructor
c
=
Reflection
.
getConstructor
(
EvilHangmanChooser
.
class
,
int
.
class
,
int
.
class
);
EvilHangmanChooser
chooser
=
Reflection
.
newInstance
(
c
,
3
,
1
);
EvilHangmanChooser
chooser
=
Reflection
.
newInstance
(
c
,
1
,
1
);
Method
m
=
Reflection
.
getMethod
(
EvilHangmanChooser
.
class
,
"makeGuess"
,
char
.
class
);
IntStream
.
range
(
0
,
20
).
forEach
(
i
->
assertThrows
(
IllegalArgumentException
.
class
,
()
->
m
.
invoke
(
chooser
,
(
char
)
(
'a'
-
(
i
+
1
)))));
IntStream
.
range
(
0
,
20
).
forEach
(
i
->
assertThrows
(
IllegalArgumentException
.
class
,
()
->
m
.
invoke
(
chooser
,
(
char
)
(
'z'
+
(
i
+
1
)))));
...
...
This diff is collapsed.
Click to expand it.
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