Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/data.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<file>data/LGPLv3.txt</file>
<file>data/example-license.json</file>
<file>data/dconf-example.override.noexistitem.json</file>
<file>data/dconfig2cpp/basic-types.meta.json</file>
<file>data/dconfig2cpp/numeric-types.meta.json</file>
<file>data/dconfig2cpp/complex-types.meta.json</file>
</qresource>
</RCC>
86 changes: 86 additions & 0 deletions tests/data/dconfig2cpp/basic-types.meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"booleanTrue": {
"value": true,
"serial": 0,
"flags": ["global"],
"name": "Boolean true value",
"permissions": "readwrite",
"visibility": "public"
},
"booleanFalse": {
"value": false,
"serial": 0,
"flags": ["global"],
"name": "Boolean false value",
"permissions": "readwrite",
"visibility": "public"
},
"stringValue": {
"value": "hello world",
"serial": 0,
"flags": ["global"],
"name": "String value",
"permissions": "readwrite",
"visibility": "public"
},
"emptyString": {
"value": "",
"serial": 0,
"flags": ["global"],
"name": "Empty string value",
"permissions": "readwrite",
"visibility": "public"
},
"integerPositive": {
"value": 42,
"serial": 0,
"flags": ["global"],
"name": "Positive integer",
"permissions": "readwrite",
"visibility": "public"
},
"integerNegative": {
"value": -10,
"serial": 0,
"flags": ["global"],
"name": "Negative integer",
"permissions": "readwrite",
"visibility": "public"
},
"integerZero": {
"value": 0,
"serial": 0,
"flags": ["global"],
"name": "Zero integer",
"permissions": "readwrite",
"visibility": "public"
},
"doubleValue": {
"value": 3.14,
"serial": 0,
"flags": ["global"],
"name": "Double value with decimal",
"permissions": "readwrite",
"visibility": "public"
},
"doubleZero": {
"value": 0.0,
"serial": 0,
"flags": ["global"],
"name": "Double zero with decimal point",
"permissions": "readwrite",
"visibility": "public"
},
"scientificValue": {
"value": 1.5e3,
"serial": 0,
"flags": ["global"],
"name": "Scientific notation value",
"permissions": "readwrite",
"visibility": "public"
}
}
}
46 changes: 46 additions & 0 deletions tests/data/dconfig2cpp/complex-types.meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"emptyArray": {
"value": [],
"serial": 0,
"flags": ["global"],
"name": "Empty array",
"permissions": "readwrite",
"visibility": "public"
},
"stringArray": {
"value": ["item1", "item2", "item3"],
"serial": 0,
"flags": ["global"],
"name": "String array",
"permissions": "readwrite",
"visibility": "public"
},
"mixedArray": {
"value": ["string", 42, true, 3.14],
"serial": 0,
"flags": ["global"],
"name": "Mixed type array",
"permissions": "readwrite",
"visibility": "public"
},
"emptyObject": {
"value": {},
"serial": 0,
"flags": ["global"],
"name": "Empty object",
"permissions": "readwrite",
"visibility": "public"
},
"simpleObject": {
"value": {"key1": "value1", "key2": "value2"},
"serial": 0,
"flags": ["global"],
"name": "Simple object",
"permissions": "readwrite",
"visibility": "public"
}
}
}
46 changes: 46 additions & 0 deletions tests/data/dconfig2cpp/numeric-types.meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"pureInteger": {
"value": 123,
"serial": 0,
"flags": ["global"],
"name": "Pure integer - should be int/qint64",
"permissions": "readwrite",
"visibility": "public"
},
"doubleWithDecimal": {
"value": 123.45,
"serial": 0,
"flags": ["global"],
"name": "Double with decimal - should be double",
"permissions": "readwrite",
"visibility": "public"
},
"doubleWithZeroDecimal": {
"value": 123.0,
"serial": 0,
"flags": ["global"],
"name": "Double with .0 - should be double",
"permissions": "readwrite",
"visibility": "public"
},
"scientificNotation": {
"value": 1.0e0,
"serial": 0,
"flags": ["global"],
"name": "Scientific notation - should be double",
"permissions": "readwrite",
"visibility": "public"
},
"largeInteger": {
"value": 9223372036854775807,
"serial": 0,
"flags": ["global"],
"name": "Large integer - should be qint64",
"permissions": "readwrite",
"visibility": "public"
}
}
}
Loading
Loading