Skip to content

Commit 4337c23

Browse files
committed
simplifying boolean logic
1 parent ade7c3a commit 4337c23

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/smoketests/SmokeTestsRunnerGenerator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class SmokeTestsRunnerGenerator(
9393
}
9494
indent()
9595
write(".map { it() }")
96-
write(".none { !it }")
96+
write(".all { it }")
9797
dedent()
9898
}
9999
renderFunctions()
@@ -234,7 +234,7 @@ class SmokeTestsRunnerGenerator(
234234
)
235235

236236
writer.withBlock("if (!success) {", "}") {
237-
write("printer.appendLine(exception.stackTraceToString().prependIndent(#S))", "#")
237+
write("printer.appendLine(exception.stackTraceToString().prependIndent(#S))", "# ")
238238
}
239239

240240
writer.write("")

codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/smoketests/SmokeTestsRunnerGeneratorTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class SmokeTestsRunnerGeneratorTest {
112112
::failureTest,
113113
)
114114
.map { it() }
115-
.none { !it }
115+
.all { it }
116116
""".formatForTest(),
117117
)
118118
}
@@ -148,7 +148,7 @@ class SmokeTestsRunnerGeneratorTest {
148148
val status: String = if (success) "ok" else "not ok"
149149
printer.appendLine("${'$'}status Test SuccessTest - no error expected from service ")
150150
if (!success) {
151-
printer.appendLine(exception.stackTraceToString().prependIndent("#"))
151+
printer.appendLine(exception.stackTraceToString().prependIndent("# "))
152152
}
153153
154154
success
@@ -186,7 +186,7 @@ class SmokeTestsRunnerGeneratorTest {
186186
val status: String = if (success) "ok" else "not ok"
187187
printer.appendLine("${'$'}status Test InvalidMessageErrorTest - error expected from service ")
188188
if (!success) {
189-
printer.appendLine(exception.stackTraceToString().prependIndent("#"))
189+
printer.appendLine(exception.stackTraceToString().prependIndent("# "))
190190
}
191191
192192
success
@@ -225,7 +225,7 @@ class SmokeTestsRunnerGeneratorTest {
225225
val status: String = if (success) "ok" else "not ok"
226226
printer.appendLine("${'$'}status Test FailureTest - error expected from service ")
227227
if (!success) {
228-
printer.appendLine(exception.stackTraceToString().prependIndent("#"))
228+
printer.appendLine(exception.stackTraceToString().prependIndent("# "))
229229
}
230230
231231
success

0 commit comments

Comments
 (0)