Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
konradweiss committed Aug 31, 2023
1 parent 626203a commit 97d59f1
Showing 1 changed file with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ class ComplexDFAOrderEvaluationTest {
nodesToOp[(functionOk.body as Block).statements[2]] = setOf("init()")

val thenBranch =
((functionOk.body as Block).statements[3] as? IfStatement)?.thenStatement
as? Block
((functionOk.body as Block).statements[3] as? IfStatement)?.thenStatement as? Block
assertNotNull(thenBranch)
nodesToOp[thenBranch.statements[0]] = setOf("start()")
nodesToOp[thenBranch.statements[1]] = setOf("process()")
Expand Down Expand Up @@ -314,8 +313,7 @@ class ComplexDFAOrderEvaluationTest {

val nodesToOp = mutableMapOf<Node, Set<String>>()
val loopBody =
((functionOk.body as Block).statements[1] as? WhileStatement)?.statement
as? Block
((functionOk.body as Block).statements[1] as? WhileStatement)?.statement as? Block
assertNotNull(loopBody)
nodesToOp[loopBody.statements[0]] = setOf("create()")
nodesToOp[loopBody.statements[1]] = setOf("init()")
Expand Down Expand Up @@ -347,8 +345,7 @@ class ComplexDFAOrderEvaluationTest {
nodesToOp[(functionOk.body as Block).statements[1]] = setOf("create()")
nodesToOp[(functionOk.body as Block).statements[2]] = setOf("init()")
val loopBody =
((functionOk.body as Block).statements[3] as? WhileStatement)?.statement
as? Block
((functionOk.body as Block).statements[3] as? WhileStatement)?.statement as? Block
assertNotNull(loopBody)
nodesToOp[loopBody.statements[0]] = setOf("start()")
nodesToOp[loopBody.statements[1]] = setOf("process()")
Expand Down Expand Up @@ -377,8 +374,7 @@ class ComplexDFAOrderEvaluationTest {
nodesToOp[(functionOk.body as Block).statements[1]] = setOf("create()")
nodesToOp[(functionOk.body as Block).statements[2]] = setOf("init()")
val loopBody =
((functionOk.body as Block).statements[3] as? WhileStatement)?.statement
as? Block
((functionOk.body as Block).statements[3] as? WhileStatement)?.statement as? Block
assertNotNull(loopBody)
nodesToOp[loopBody.statements[0]] = setOf("start()")
nodesToOp[loopBody.statements[1]] = setOf("process()")
Expand Down Expand Up @@ -410,8 +406,7 @@ class ComplexDFAOrderEvaluationTest {
nodesToOp[(functionOk.body as Block).statements[4]] = setOf("process()")
nodesToOp[(functionOk.body as Block).statements[5]] = setOf("finish()")
val loopBody =
((functionOk.body as Block).statements[6] as? WhileStatement)?.statement
as? Block
((functionOk.body as Block).statements[6] as? WhileStatement)?.statement as? Block
assertNotNull(loopBody)
nodesToOp[loopBody.statements[0]] = setOf("start()")
nodesToOp[loopBody.statements[1]] = setOf("process()")
Expand Down Expand Up @@ -439,9 +434,7 @@ class ComplexDFAOrderEvaluationTest {
val nodesToOp = mutableMapOf<Node, Set<String>>()
nodesToOp[(functionOk.body as Block).statements[1]] = setOf("create()")
nodesToOp[(functionOk.body as Block).statements[2]] = setOf("init()")
val loopBody =
((functionOk.body as Block).statements[3] as DoStatement).statement
as? Block
val loopBody = ((functionOk.body as Block).statements[3] as DoStatement).statement as? Block
assertNotNull(loopBody)
nodesToOp[loopBody.statements[0]] = setOf("start()")
nodesToOp[loopBody.statements[1]] = setOf("process()")
Expand Down Expand Up @@ -522,8 +515,7 @@ class ComplexDFAOrderEvaluationTest {
)
// We cannot use p1Decl as start of the analysis because it has no nextEOG edges. Instead,
// we want to start with the first instruction of the function.
val everythingOk =
orderEvaluator.evaluateOrder((functionOk.body as Block).statements[0])
val everythingOk = orderEvaluator.evaluateOrder((functionOk.body as Block).statements[0])

assertFalse(everythingOk, "Expected incorrect order")
assertContains(
Expand Down

0 comments on commit 97d59f1

Please sign in to comment.