~valhalla-routing/+junk/valhalla_2.1.9-0ubuntu1

« back to all changes in this revision

Viewing changes to libvalhalla/rapidjson/bin/jsonschema/tests/draft3/dependencies.json

  • Committer: valhalla
  • Date: 2017-04-24 20:20:53 UTC
  • Revision ID: valhalla@mapzen.com-20170424202053-7o69b9nwx9ee0tw3
PackagingĀ forĀ 2.1.9-0ubuntu1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[
 
2
    {
 
3
        "description": "dependencies",
 
4
        "schema": {
 
5
            "dependencies": {"bar": "foo"}
 
6
        },
 
7
        "tests": [
 
8
            {
 
9
                "description": "neither",
 
10
                "data": {},
 
11
                "valid": true
 
12
            },
 
13
            {
 
14
                "description": "nondependant",
 
15
                "data": {"foo": 1},
 
16
                "valid": true
 
17
            },
 
18
            {
 
19
                "description": "with dependency",
 
20
                "data": {"foo": 1, "bar": 2},
 
21
                "valid": true
 
22
            },
 
23
            {
 
24
                "description": "missing dependency",
 
25
                "data": {"bar": 2},
 
26
                "valid": false
 
27
            },
 
28
            {
 
29
                "description": "ignores non-objects",
 
30
                "data": "foo",
 
31
                "valid": true
 
32
            }
 
33
        ]
 
34
    },
 
35
    {
 
36
        "description": "multiple dependencies",
 
37
        "schema": {
 
38
            "dependencies": {"quux": ["foo", "bar"]}
 
39
        },
 
40
        "tests": [
 
41
            {
 
42
                "description": "neither",
 
43
                "data": {},
 
44
                "valid": true
 
45
            },
 
46
            {
 
47
                "description": "nondependants",
 
48
                "data": {"foo": 1, "bar": 2},
 
49
                "valid": true
 
50
            },
 
51
            {
 
52
                "description": "with dependencies",
 
53
                "data": {"foo": 1, "bar": 2, "quux": 3},
 
54
                "valid": true
 
55
            },
 
56
            {
 
57
                "description": "missing dependency",
 
58
                "data": {"foo": 1, "quux": 2},
 
59
                "valid": false
 
60
            },
 
61
            {
 
62
                "description": "missing other dependency",
 
63
                "data": {"bar": 1, "quux": 2},
 
64
                "valid": false
 
65
            },
 
66
            {
 
67
                "description": "missing both dependencies",
 
68
                "data": {"quux": 1},
 
69
                "valid": false
 
70
            }
 
71
        ]
 
72
    },
 
73
    {
 
74
        "description": "multiple dependencies subschema",
 
75
        "schema": {
 
76
            "dependencies": {
 
77
                "bar": {
 
78
                    "properties": {
 
79
                        "foo": {"type": "integer"},
 
80
                        "bar": {"type": "integer"}
 
81
                    }
 
82
                }
 
83
            }
 
84
        },
 
85
        "tests": [
 
86
            {
 
87
                "description": "valid",
 
88
                "data": {"foo": 1, "bar": 2},
 
89
                "valid": true
 
90
            },
 
91
            {
 
92
                "description": "wrong type",
 
93
                "data": {"foo": "quux", "bar": 2},
 
94
                "valid": false
 
95
            },
 
96
            {
 
97
                "description": "wrong type other",
 
98
                "data": {"foo": 2, "bar": "quux"},
 
99
                "valid": false
 
100
            },
 
101
            {
 
102
                "description": "wrong type both",
 
103
                "data": {"foo": "quux", "bar": "quux"},
 
104
                "valid": false
 
105
            }
 
106
        ]
 
107
    }
 
108
]