Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: tools/json_schema_compiler/test/array.json

Issue 9415001: Add tests to tools/json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/json_schema_compiler/test/array.json
diff --git a/tools/json_schema_compiler/test/array.json b/tools/json_schema_compiler/test/array.json
new file mode 100644
index 0000000000000000000000000000000000000000..863dc043bc854bbf247ca03ba8bb3ad0198c6136
--- /dev/null
+++ b/tools/json_schema_compiler/test/array.json
@@ -0,0 +1,67 @@
+[
+ {
+ "namespace": "array",
+ "types": [
+ {
+ "id": "BasicArrayType",
+ "type": "object",
+ "properties": {
+ "strings": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "booleans": {
+ "type": "array",
+ "items": {"type": "boolean"}
+ },
+ "numbers": {
+ "type": "array",
+ "items": {"type": "number"}
+ },
+ "integers": {
+ "type": "array",
+ "items": {"type": "integer"}
+ }
+ }
+ },
+ {
+ "id": "Item",
+ "type": "object",
+ "properties": {
+ "val": {
+ "type": "integer"
+ }
+ }
+ },
+ {
+ "id": "RefArrayType",
+ "type": "object",
+ "properties": {
+ "refs": {
+ "type": "array",
+ "items": { "$ref": "Item" }
+ }
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "integerArray",
+ "type": "function",
+ "description": "Increments the given integer.",
Yoyo Zhou 2012/02/22 00:58:47 ?
+ "parameters": [
+ {
+ "name": "nums",
+ "type": "array",
+ "items": {"type": "integer"}
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": []
+ }
+ ]
+ }
not at google - send to devlin 2012/02/18 03:29:02 test arrays of other things too, like Item / {$ref
calamity 2012/02/20 05:03:37 Done.
+ ]
+ }
+]

Powered by Google App Engine
This is Rietveld 408576698