From e5b9e1f5e79095b33f356815242d4014c874baed Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 19 Oct 2021 21:08:15 +0200 Subject: [PATCH] string object identity hashcode can be negative sometimes, so allow a '-' character. --- compilerAst/test/TestProg8Parser.kt | 6 +++--- compilerAst/test/TestSourceCode.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compilerAst/test/TestProg8Parser.kt b/compilerAst/test/TestProg8Parser.kt index da566e58a..edac24c9c 100644 --- a/compilerAst/test/TestProg8Parser.kt +++ b/compilerAst/test/TestProg8Parser.kt @@ -219,7 +219,7 @@ class TestProg8Parser { val module = parseModule(SourceCode.Text(srcText)) // Note: assertContains has *actual* as first param - assertContains(module.name, Regex("^$")) + assertContains(module.name, Regex("^$")) } @Test @@ -289,7 +289,7 @@ class TestProg8Parser { try { parseModule(SourceCode.Text(srcText)) } catch (e: ParseError) { - assertPosition(e.position, Regex("^$"), 1, 4, 4) + assertPosition(e.position, Regex("^$"), 1, 4, 4) } } @@ -312,7 +312,7 @@ class TestProg8Parser { } """.trimIndent() val module = parseModule(SourceCode.Text(srcText)) - assertPositionOf(module, Regex("^$"), 1, 0) // TODO: endCol wrong + assertPositionOf(module, Regex("^$"), 1, 0) // TODO: endCol wrong } @Test diff --git a/compilerAst/test/TestSourceCode.kt b/compilerAst/test/TestSourceCode.kt index 5f9027814..cd0a337f0 100644 --- a/compilerAst/test/TestSourceCode.kt +++ b/compilerAst/test/TestSourceCode.kt @@ -22,7 +22,7 @@ class TestSourceCode { val src = SourceCode.Text(text) val actualText = src.getCharStream().toString() - assertContains(src.origin, Regex("^$")) + assertContains(src.origin, Regex("^$")) assertEquals(text, actualText) assertFalse(src.isFromResources) assertFalse(src.isFromFilesystem)