add compile test
This commit is contained in:
parent
c20c122ee4
commit
e871cee0bb
2 changed files with 26 additions and 0 deletions
|
|
@ -2301,6 +2301,16 @@ obj {
|
|||
`,
|
||||
expErr: `d2/testdata/d2compiler/TestCompile/grid_negative.d2:3:16: grid-columns must be a positive integer: "-200"`,
|
||||
},
|
||||
{
|
||||
name: "grid_gap_negative",
|
||||
text: `hey: {
|
||||
grid-gap-columns: -200
|
||||
grid-gap-rows: -30
|
||||
}
|
||||
`,
|
||||
expErr: `d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2:2:20: grid-gap-columns must be a non-negative integer: "-200"
|
||||
d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2:3:17: grid-gap-rows must be a non-negative integer: "-30"`,
|
||||
},
|
||||
{
|
||||
name: "grid_edge",
|
||||
text: `hey: {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/grid_gap_negative.exp.json
generated
vendored
Normal file
16
testdata/d2compiler/TestCompile/grid_gap_negative.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"graph": null,
|
||||
"err": {
|
||||
"ioerr": null,
|
||||
"errs": [
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2,1:19:26-1:23:30",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2:2:20: grid-gap-columns must be a non-negative integer: \"-200\""
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2,2:16:47-2:19:50",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2:3:17: grid-gap-rows must be a non-negative integer: \"-30\""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue