@@ -2,9 +2,8 @@ package io.shiftleft.passes
22
33import flatgraph .SchemaViolationException
44import io .shiftleft .codepropertygraph .generated .Cpg
5- import io .shiftleft .codepropertygraph .generated .ControlStructureTypes
65import io .shiftleft .codepropertygraph .generated .language .*
7- import io .shiftleft .codepropertygraph .generated .nodes .{ NewBlock , NewControlStructure , NewFile }
6+ import io .shiftleft .codepropertygraph .generated .nodes .NewFile
87import org .scalatest .matchers .should .Matchers
98import org .scalatest .wordspec .AnyWordSpec
109
@@ -54,28 +53,6 @@ class CpgPassNewTests extends AnyWordSpec with Matchers {
5453 }
5554 }
5655
57- " accept explicit control-structure body edges" in {
58- val cpg = Cpg .empty
59- val pass = new CpgPass (cpg, " pass1-control-structure-edges" ) {
60- override def run (dst : DiffGraphBuilder ): Unit = {
61- val controlStructure = NewControlStructure ().controlStructureType(ControlStructureTypes .IF )
62- val trueBody = NewBlock ()
63- val falseBody = NewBlock ()
64-
65- dst
66- .addNode(controlStructure)
67- .addNode(trueBody)
68- .addNode(falseBody)
69- .addEdge(controlStructure, trueBody, " TRUE_BODY" )
70- .addEdge(controlStructure, falseBody, " FALSE_BODY" )
71- }
72- }
73-
74- noException shouldBe thrownBy {
75- pass.createAndApply()
76- }
77- }
78-
7956 " call init and finish once around run" in {
8057 val cpg = Cpg .empty
8158 val events = ArrayBuffer .empty[String ]
0 commit comments