Skip to content

Commit

Permalink
93: fixed test on Windows
Browse files Browse the repository at this point in the history
Task-Url: #93
  • Loading branch information
LorenzoBettini committed Apr 2, 2021
1 parent 283443a commit 794deac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jbase.tests/src/jbase/tests/JbaseValidatorTest.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -1650,16 +1650,17 @@ class JbaseValidatorTest extends JbaseAbstractTest {
@Test def void testTryWithResourcesNotAutoCloseableType() {
// Note that the type of the declared variable is taken into consideration
// not the actual type of the initialization expression
'''
val input = '''
try (
Object fr1 = new java.io.FileReader("");
) {

}
'''.parse.assertError(
'''
input.parse.assertError(
jbasePackage.XJTryWithResourcesVariableDeclaration,
JbaseIssueCodes.NOT_AUTO_CLOSEABLE,
7, 6, // error placed on "Object"
input.indexOf("Object"), 6, // error placed on "Object"
'The resource type Object does not implement java.lang.AutoCloseable'
)
}
Expand Down

0 comments on commit 794deac

Please sign in to comment.