[Spec tests] Review fix tests for try-expression and if-expression
This commit is contained in:
+1
-3
@@ -15,7 +15,6 @@ fun box(): String {
|
||||
var isTryExecuted = false
|
||||
var isCatched = false
|
||||
var isFinallyExecuted = false
|
||||
var isExecutedFully = false
|
||||
try {
|
||||
isTryExecuted = true
|
||||
} catch (e: Exception) {
|
||||
@@ -23,7 +22,6 @@ fun box(): String {
|
||||
} finally {
|
||||
isFinallyExecuted = true
|
||||
}
|
||||
isExecutedFully = true
|
||||
return if (isTryExecuted && !isCatched && isFinallyExecuted && isExecutedFully) "OK"
|
||||
return if (isTryExecuted && !isCatched && isFinallyExecuted) "OK"
|
||||
else "NOK"
|
||||
}
|
||||
+1
-3
@@ -16,7 +16,6 @@ fun box(): String {
|
||||
var isTryExecuted = false
|
||||
var isCatched = false
|
||||
var isFinallyExecuted = false
|
||||
var isExecutedFully = false
|
||||
try {
|
||||
isTryExecuted = true
|
||||
throwException(true)
|
||||
@@ -25,7 +24,6 @@ fun box(): String {
|
||||
} finally {
|
||||
isFinallyExecuted = true
|
||||
}
|
||||
isExecutedFully = true
|
||||
return if (isTryExecuted &&isCatched && isFinallyExecuted && isExecutedFully) "OK"
|
||||
return if (isTryExecuted &&isCatched && isFinallyExecuted) "OK"
|
||||
else "NOK"
|
||||
}
|
||||
+1
-4
@@ -19,7 +19,6 @@ fun box(): String {
|
||||
var isTryExecuted = false
|
||||
var isCatched = false
|
||||
var isFinallyExecuted = false
|
||||
var isExecutedFully = false
|
||||
var isTryExpressionPropagated = false
|
||||
|
||||
try {
|
||||
@@ -35,12 +34,10 @@ fun box(): String {
|
||||
isTryExpressionPropagated = true
|
||||
}
|
||||
|
||||
isExecutedFully = true
|
||||
return if (isTryExecuted &&
|
||||
!isCatched &&
|
||||
isFinallyExecuted &&
|
||||
isTryExpressionPropagated &&
|
||||
isExecutedFully
|
||||
isTryExpressionPropagated
|
||||
) "OK"
|
||||
else "NOK"
|
||||
}
|
||||
Reference in New Issue
Block a user