File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ package autog
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/nulab/autog/graph"
7
+ "github.com/nulab/autog/phase4"
8
+ "github.com/stretchr/testify/assert"
9
+ )
10
+
11
+ // These tests are meant to ensure a minimal degree of reliability of the default layout pipeline and
12
+ // a first barrier against regressions, pending proper unit tests
13
+ func TestLayoutCrashers (t * testing.T ) {
14
+ t .Run ("phase4 SinkColoring" , func (t * testing.T ) {
15
+ t .Run ("#1 and #4" , func (t * testing.T ) {
16
+ g := graph .FromEdgeSlice ([][]string {
17
+ {"N1" , "N2" },
18
+ {"N3" , "N1" },
19
+ {"N2" , "N3" },
20
+ {"Nh" , "N1" },
21
+ {"Nk" , "N1" },
22
+ {"Na" , "N2" },
23
+ {"Na" , "N3" },
24
+ {"N2" , "Nd" },
25
+ })
26
+ assert .NotPanics (t , func () {
27
+ g = Layout (g , WithPositioning (phase4 .SinkColoring ))
28
+ })
29
+ assertInvariants (t , g )
30
+ })
31
+ })
32
+ }
33
+
34
+ func assertInvariants (t * testing.T , g * graph.DGraph ) {
35
+ // todo
36
+ }
You can’t perform that action at this time.
0 commit comments