testsuite: Add empty node tests

For every node type, add a test that creates it empty and ensure that
it prints the reference output.
This commit is contained in:
Benjamin Otte 2019-05-19 21:34:13 +02:00
parent b90a66cab5
commit b37c2216fc
39 changed files with 161 additions and 0 deletions

View File

@ -80,6 +80,44 @@ node_parser_tests = [
'crash4.errors',
'crash4.node',
'crash4.ref.node',
'empty-blend.node',
'empty-blend.ref.node',
'empty-blur.node',
'empty-blur.ref.node',
'empty-border.node',
'empty-border.ref.node',
'empty-clip.node',
'empty-clip.ref.node',
'empty-color.node',
'empty-color.ref.node',
'empty-color-matrix.node',
'empty-color-matrix.ref.node',
'empty-container.node',
'empty-container.ref.node',
'empty-cross-fade.node',
'empty-cross-fade.ref.node',
'empty-debug.node',
'empty-debug.ref.node',
'empty-inset-shadow.node',
'empty-inset-shadow.ref.node',
'empty-linear-gradient.node',
'empty-linear-gradient.ref.node',
'empty-opacity.node',
'empty-opacity.ref.node',
'empty-outset-shadow.node',
'empty-outset-shadow.ref.node',
'empty-repeat.node',
'empty-repeat.ref.node',
'empty-rounded-clip.node',
'empty-rounded-clip.ref.node',
'empty-shadow.node',
'empty-shadow.ref.node',
'empty-text.node',
'empty-text.ref.node',
'empty-texture.node',
'empty-texture.ref.node',
'empty-transform.node',
'empty-transform.ref.node',
]
foreach test : node_parser_tests

View File

@ -0,0 +1 @@
blend { }

View File

@ -0,0 +1,10 @@
blend {
bottom: color {
bounds: 0 0 50 50;
color: rgb(170,255,0);
}
top: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
blur { }

View File

@ -0,0 +1,6 @@
blur {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
border { }

View File

@ -0,0 +1,3 @@
border {
outline: 0 0 50 50;
}

View File

@ -0,0 +1 @@
clip { }

View File

@ -0,0 +1,7 @@
clip {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
clip: 0 0 50 50;
}

View File

@ -0,0 +1 @@
color-matrix { }

View File

@ -0,0 +1,6 @@
color-matrix {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
color { }

View File

@ -0,0 +1,4 @@
color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}

View File

@ -0,0 +1 @@
container { }

View File

@ -0,0 +1 @@
cross-fade { }

View File

@ -0,0 +1,10 @@
cross-fade {
end: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
start: color {
bounds: 0 0 50 50;
color: rgb(170,255,0);
}
}

View File

@ -0,0 +1 @@
debug { }

View File

@ -0,0 +1,6 @@
debug {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
inset-shadow { }

View File

@ -0,0 +1,3 @@
inset-shadow {
outline: 0 0 50 50;
}

View File

@ -0,0 +1 @@
linear-gradient { }

View File

@ -0,0 +1,6 @@
linear-gradient {
bounds: 0 0 50 50;
end: 0 50;
start: 0 0;
stops: 0 rgb(170,255,0), 1 rgb(255,0,204);
}

View File

@ -0,0 +1 @@
opacity { }

View File

@ -0,0 +1,6 @@
opacity {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
outset-shadow { }

View File

@ -0,0 +1,3 @@
outset-shadow {
outline: 0 0 50 50;
}

View File

@ -0,0 +1 @@
repeat { }

View File

@ -0,0 +1,6 @@
repeat {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}

View File

@ -0,0 +1 @@
rounded-clip { }

View File

@ -0,0 +1,7 @@
rounded-clip {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
clip: 0 0 50 50;
}

View File

@ -0,0 +1 @@
shadow { }

View File

@ -0,0 +1,7 @@
shadow {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
shadows: rgb(0,0,0) 1 1;
}

View File

@ -0,0 +1 @@
text { }

View File

@ -0,0 +1,4 @@
text {
font: "Cantarell 11";
glyphs: "Hello";
}

View File

@ -0,0 +1 @@
texture { }

View File

@ -0,0 +1,4 @@
texture {
bounds: 0 0 50 50;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQXY0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=");
}

View File

@ -0,0 +1 @@
transform { }

View File

@ -0,0 +1,6 @@
transform {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
}