aboutsummaryrefslogtreecommitdiffstats
path: root/JSONSchema
diff options
context:
space:
mode:
authorJared Wasinger <j-wasinger@hotmail.com>2017-10-26 13:50:57 +0800
committerYoichi Hirai <i@yoichihirai.com>2018-01-30 21:34:17 +0800
commit12f89dbb67710780370ddf21ce3702ef8059d547 (patch)
tree97602ab0399ad3e1320c4f0d6b167532d4167fc3 /JSONSchema
parentb2130c1c506c5dae180a1ef957b966450068a6b8 (diff)
downloadtangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar.gz
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar.bz2
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar.lz
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar.xz
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.tar.zst
tangerine-tests-12f89dbb67710780370ddf21ce3702ef8059d547.zip
add expect section to linting of test fillers
Diffstat (limited to 'JSONSchema')
-rw-r--r--JSONSchema/st-filler-schema.json82
1 files changed, 78 insertions, 4 deletions
diff --git a/JSONSchema/st-filler-schema.json b/JSONSchema/st-filler-schema.json
index da9f2fea6..ed8f6d278 100644
--- a/JSONSchema/st-filler-schema.json
+++ b/JSONSchema/st-filler-schema.json
@@ -105,12 +105,20 @@
}
}
}
+ }
+ },
+ "NonExistentPostStateAccount": {
+ "type": "object",
+ "additionalproperties": true,
+ "properties": {
+ "shouldnotexist": {
+ "type": "boolean"
+ }
},
"required": [
- "balance",
- "code",
- "nonce"
+ "shouldnotexist"
]
+
},
"TxSigR": {
"oneOf": [
@@ -214,6 +222,69 @@
"to",
"value"
]
+ },
+ "PostStateAccounts": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses without 0x prefix",
+ "oneOf": [
+ {"$ref": "#/definitions/PreStateAccount"},
+ {"$ref": "#/NonExistentPostStateAccount"}
+ ]
+ },
+ "^0x[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses with 0x prefix",
+ "oneOf": [
+ {"$ref": "#/definitions/PreStateAccount"},
+ {"$ref": "#/NonExistentPostStateAccount"}
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "ExpectCondition": {
+ "type": "object",
+ "properties": {
+ "result": { "$ref": "#/definitions/AccountMap" },
+ "network": { "$ref": "#/definitions/Networks" },
+ "indexes": {
+ "properties": {
+ "data": { "$ref": "#/definitions/Indices" },
+ "gas": { "$ref": "#/definitions/Indices" },
+ "value": { "$ref": "#/definitions/Indices" }
+ },
+ "result": {
+ "$ref": "#/definitions/PostStateAccounts"
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
+ "AccountMap": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses without 0x prefix",
+ "$ref": "#/definitions/PreStateAccount"
+ },
+ "^0x[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses with 0x prefix",
+ "$ref": "#/definitions/PreStateAccount"
+ }
+ },
+ "type": "object"
+ },
+ "Networks": {
+ "type": "array"
+ },
+ "Indices": {
+ "oneOf": [
+ { "type": "array" },
+ { "type": "string" },
+ { "type": "Number" }
+ ]
}
},
"patternProperties": {
@@ -239,7 +310,10 @@
],
"type": "object"
},
- "expect": {},
+ "expect": {
+ "type": "array",
+ "items": { "$ref": "#/definitions/ExpectCondition" }
+ },
"pre": {
"additionalProperties": false,
"patternProperties": {