Add unit tests that catch invalid 'screen' and 'widget' JSON data.
This commit is contained in:
27
unittest/data/TestScreen-invalid.json
Normal file
27
unittest/data/TestScreen-invalid.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 320,
|
||||
"h": 240,
|
||||
|
||||
"widgets": [
|
||||
{
|
||||
"name": "one",
|
||||
"x": 16,
|
||||
"y": 16,
|
||||
"w": 48,
|
||||
"h": 48,
|
||||
"label": "One",
|
||||
"type": 0
|
||||
},
|
||||
{
|
||||
"name": "two",
|
||||
"x": 256,
|
||||
"y": 16,
|
||||
"w": 48,
|
||||
"h": 48,
|
||||
"label": "Two",
|
||||
"type": 0
|
||||
}
|
||||
]
|
||||
}
|
8
unittest/data/TestWidget-invalid.json
Normal file
8
unittest/data/TestWidget-invalid.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"x": 16,
|
||||
"y": 16,
|
||||
"w": 48,
|
||||
"h": 48,
|
||||
"label": "One",
|
||||
"type": 0
|
||||
}
|
Reference in New Issue
Block a user