[FIR] Tests. Add orthogonal edge routing for cfg dumps

This commit is contained in:
Dmitriy Novozhilov
2019-08-28 10:51:23 +03:00
parent b2e95eebab
commit 59205cac13
23 changed files with 46 additions and 0 deletions
@@ -1,4 +1,6 @@
digraph binaryOperations_kt { digraph binaryOperations_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph booleanOperatorsWithConsts_kt { digraph booleanOperatorsWithConsts_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
+2
View File
@@ -1,4 +1,6 @@
digraph complex_kt { digraph complex_kt {
graph [splines=ortho]
subgraph fetchPluginReleaseDate { subgraph fetchPluginReleaseDate {
0 [shape=box label="Enter function fetchPluginReleaseDate"]; 0 [shape=box label="Enter function fetchPluginReleaseDate"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph initBlock_kt { digraph initBlock_kt {
graph [splines=ortho]
subgraph <init> { subgraph <init> {
0 [shape=box label="Enter function <init>"]; 0 [shape=box label="Enter function <init>"];
1 [shape=box label="Exit function <init>"]; 1 [shape=box label="Exit function <init>"];
+2
View File
@@ -1,4 +1,6 @@
digraph jumps_kt { digraph jumps_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
+2
View File
@@ -1,4 +1,6 @@
digraph lambdas_kt { digraph lambdas_kt {
graph [splines=ortho]
subgraph run { subgraph run {
0 [shape=box label="Enter function run"]; 0 [shape=box label="Enter function run"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
+2
View File
@@ -1,4 +1,6 @@
digraph loops_kt { digraph loops_kt {
graph [splines=ortho]
subgraph testWhile { subgraph testWhile {
0 [shape=box label="Enter function testWhile"]; 0 [shape=box label="Enter function testWhile"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph propertiesAndInitBlocks_kt { digraph propertiesAndInitBlocks_kt {
graph [splines=ortho]
subgraph run { subgraph run {
0 [shape=box label="Enter function run"]; 0 [shape=box label="Enter function run"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
+2
View File
@@ -1,4 +1,6 @@
digraph simple_kt { digraph simple_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph tryCatch_kt { digraph tryCatch_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
+2
View File
@@ -1,4 +1,6 @@
digraph when_kt { digraph when_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph booleanOperators_kt { digraph booleanOperators_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph boundSmartcasts_kt { digraph boundSmartcasts_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph casts_kt { digraph casts_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph elvis_kt { digraph elvis_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph equalsAndIdentity_kt { digraph equalsAndIdentity_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph equalsToBoolean_kt { digraph equalsToBoolean_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph inPlaceLambdas_kt { digraph inPlaceLambdas_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph nullability_kt { digraph nullability_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -1,4 +1,6 @@
digraph returns_kt { digraph returns_kt {
graph [splines=ortho]
subgraph test_0 { subgraph test_0 {
0 [shape=box label="Enter function test_0"]; 0 [shape=box label="Enter function test_0"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph simpleIf_kt { digraph simpleIf_kt {
graph [splines=ortho]
subgraph test_1 { subgraph test_1 {
0 [shape=box label="Enter function test_1"]; 0 [shape=box label="Enter function test_1"];
1 [shape=box label="Enter block"]; 1 [shape=box label="Enter block"];
@@ -1,4 +1,6 @@
digraph when_kt { digraph when_kt {
graph [splines=ortho]
subgraph foo { subgraph foo {
0 [shape=box label="Enter function foo"]; 0 [shape=box label="Enter function foo"];
1 [shape=box label="Exit function foo"]; 1 [shape=box label="Exit function foo"];
@@ -60,6 +60,8 @@ abstract class AbstractFirCfgBuildingTest : AbstractFirResolveTestCase() {
override fun visitFile(file: FirFile) { override fun visitFile(file: FirFile) {
dotBuilder.appendln("digraph ${file.name.replace(".", "_")} {") dotBuilder.appendln("digraph ${file.name.replace(".", "_")} {")
.appendln("graph [splines=ortho]")
.appendln()
super.visitFile(file) super.visitFile(file)
dotBuilder.appendln("}") dotBuilder.appendln("}")
} }