Tests like these:
|
@Test |
|
public void readQuotedString_noOpen() throws Exception { |
|
try { |
|
new StringReader("hello world\"").readQuotedString(); |
|
} catch (final CommandSyntaxException ex) { |
|
assertThat(ex.getType(), is(CommandSyntaxException.BUILT_IN_EXCEPTIONS.readerExpectedStartOfQuote())); |
|
assertThat(ex.getCursor(), is(0)); |
|
} |
|
} |
will actually pass if no exception is thrown.
Tests like these:
brigadier/src/test/java/com/mojang/brigadier/StringReaderTest.java
Lines 239 to 247 in cf754c4
will actually pass if no exception is thrown.