From 9c70d5088cff434c74d0e790b390d1cab96f37e7 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Sat, 13 Nov 2021 13:46:43 +0300 Subject: [PATCH] [Native][tests] Don't warn when committed TestFile is committed again Actually, there is nothing wrong with calling commit() again: Some TestFiles are created as uncommitted and require calling commit(), while others are created as committed from the very beginning. --- .../tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt index 9f73073eb2c..a709af5933e 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt @@ -52,7 +52,9 @@ internal class TestFile private constructor( location.writeText(state.text) this.state = State.Committed } - is State.Committed -> System.err.println("$this has been committed again. Need to check why this had happened.") + is State.Committed -> { + // Nothing to do. File is already saved to the disk. + } } }