Minor. Reformat

This commit is contained in:
Mikhael Bogdanov
2018-10-23 09:38:30 +02:00
parent 0288a1bd2d
commit d77175b7e4
@@ -63,20 +63,16 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
} }
rootSuite.addTest(this) rootSuite.addTest(this)
} }
} } catch (e: RuntimeException) {
catch (e: RuntimeException) {
e.printStackTrace() e.printStackTrace()
throw e throw e
} } finally {
finally {
emulator.stopEmulator() emulator.stopEmulator()
} }
} } catch (e: RuntimeException) {
catch (e: RuntimeException) {
e.printStackTrace() e.printStackTrace()
throw e throw e
} } finally {
finally {
emulator.finishEmulatorProcesses() emulator.finishEmulatorProcesses()
} }
@@ -88,8 +84,7 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
val lines = file.readLines().map { val lines = file.readLines().map {
if (it.startsWith("android.enableD8=")) { if (it.startsWith("android.enableD8=")) {
"android.enableD8=$enable" "android.enableD8=$enable"
} } else it
else it
} }
file.writeText(lines.joinToString("\n")) file.writeText(lines.joinToString("\n"))
} }
@@ -118,12 +113,10 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
val resultOutput = gradleRunner.connectedDebugAndroidTest() val resultOutput = gradleRunner.connectedDebugAndroidTest()
processReport(suite, resultOutput) processReport(suite, resultOutput)
return suite return suite
} } finally {
finally {
if (platformPrefixProperty != null) { if (platformPrefixProperty != null) {
System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, platformPrefixProperty) System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, platformPrefixProperty)
} } else {
else {
System.clearProperty(PlatformUtils.PLATFORM_PREFIX_KEY) System.clearProperty(PlatformUtils.PLATFORM_PREFIX_KEY)
} }
} }
@@ -182,8 +175,7 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
} }
} }
} } else {
else {
object : TestCase(name) { object : TestCase(name) {
@Throws(Throwable::class) @Throws(Throwable::class)
override fun runTest() { override fun runTest() {