Skip to content

Commit

Permalink
Rebuild type spectest
Browse files Browse the repository at this point in the history
  • Loading branch information
sharyanto committed Jan 11, 2013
1 parent 39ac0d4 commit ee8248a
Show file tree
Hide file tree
Showing 8 changed files with 308 additions and 64 deletions.
2 changes: 1 addition & 1 deletion share/spectest/10-type-all.yaml
Expand Up @@ -63,4 +63,4 @@ tests:
- div_by - div_by
- 5 - 5
valid: 1 valid: 1
version: v0.9.22 (generated by devscripts/gen-type-spectest on Tue Dec 4 16:54:51 2012) version: v0.9.22 (generated by devscripts/gen-type-spectest on Fri Jan 11 13:35:48 2013)
2 changes: 1 addition & 1 deletion share/spectest/10-type-any.yaml
Expand Up @@ -63,4 +63,4 @@ tests:
- div_by - div_by
- 5 - 5
valid: 1 valid: 1
version: v0.9.22 (generated by devscripts/gen-type-spectest on Tue Dec 4 16:54:51 2012) version: v0.9.22 (generated by devscripts/gen-type-spectest on Fri Jan 11 13:35:48 2013)
95 changes: 77 additions & 18 deletions share/spectest/10-type-array.yaml
Expand Up @@ -90,6 +90,14 @@ tests:
- default - default
- a - a
valid: 0 valid: 0
-
dies: 1
input: *1
name: clause (dies, unknown clause)
schema:
- array*
- clause
- foo
- -
input: *1 input: *1
name: clause (ok) name: clause (ok)
Expand All @@ -109,8 +117,27 @@ tests:
- clause - clause
- -
- min_len - min_len
- 1 - 2
valid: 0 valid: 0
-
dies: 1
input: *1
name: clset (dies, unknown clause)
schema:
- array*
- clset
-
foo: 1
-
dies: 1
input: *1
name: clset (dies, unknown attr)
schema:
- array*
- clset
-
min_len: 1
min_len.foo: 1
- -
input: *1 input: *1
name: clset (empty = ok) name: clset (empty = ok)
Expand All @@ -120,6 +147,16 @@ tests:
- {} - {}


valid: 1 valid: 1
-
input: *1
name: clset (ignored clause/attr = ok)
schema:
- array*
- clset
-
_foo: 1
foo._bar: 2
valid: 1
- -
input: *1 input: *1
name: clset (ok + ok = ok) name: clset (ok + ok = ok)
Expand Down Expand Up @@ -148,7 +185,7 @@ tests:
- clset - clset
- -
max_len: 1 max_len: 1
min_len: 1 min_len: 2
valid: 0 valid: 0
- -
input: *1 input: *1
Expand All @@ -158,7 +195,7 @@ tests:
- clset - clset
- -
max_len: 0 max_len: 0
min_len: 1 min_len: 2
valid: 0 valid: 0
- -
input: &3 [] input: &3 []
Expand Down Expand Up @@ -296,7 +333,7 @@ tests:
- *6 - *6
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: is& (nok + nok) name: is& (nok + nok)
schema: schema:
Expand Down Expand Up @@ -354,7 +391,7 @@ tests:
- and - and
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: is.op=and (nok + nok) name: is.op=and (nok + nok)
schema: schema:
Expand Down Expand Up @@ -522,7 +559,7 @@ tests:
- none - none
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: is.op=none (ok + ok) name: is.op=none (ok + ok)
schema: schema:
Expand Down Expand Up @@ -634,7 +671,7 @@ tests:
- *9 - *9
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: in& (nok + nok) name: in& (nok + nok)
schema: schema:
Expand Down Expand Up @@ -693,7 +730,7 @@ tests:
- and - and
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: in.op=and (nok + nok) name: in.op=and (nok + nok)
schema: schema:
Expand Down Expand Up @@ -861,7 +898,7 @@ tests:
- none - none
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: *5 input: *5
name: in.op=none (ok + ok) name: in.op=none (ok + ok)
schema: schema:
Expand Down Expand Up @@ -980,12 +1017,34 @@ tests:
- each_elem - each_elem
- int - int
valid: 0 valid: 0
-
input: &14
- 1
- '1.2'
name: elems (ok)
schema:
- array
- elems
-
- int
- float
valid: 1
-
input: *14
name: elems (nok)
schema:
- array
- elems
-
- int
- int
valid: 0
- -
input: input:
- ~ - ~
- 1 - 1
name: elems (nok, first elem required) name: elems (nok, first elem required)
schema: &14 schema: &15
- array - array
- -
elems: elems:
Expand All @@ -999,45 +1058,45 @@ tests:
input: input:
- 1 - 1
name: elems (ok, missing elem set to undef) name: elems (ok, missing elem set to undef)
schema: *14 schema: *15
valid: 1 valid: 1
- -
input: input:
- 1 - 1
- ~ - ~
name: elems (ok, second elem optional) name: elems (ok, second elem optional)
schema: *14 schema: *15
valid: 1 valid: 1
- -
input: input:
- 1 - 1
- '1.1' - '1.1'
name: elems (ok 2) name: elems (ok 2)
schema: *14 schema: *15
valid: 1 valid: 1
- -
input: input:
- 1 - 1
- '1.1' - '1.1'
- ~ - ~
name: elems (ok, extra elems ignored) name: elems (ok, extra elems ignored)
schema: *14 schema: *15
valid: 1 valid: 1
- -
input: input:
- 1 - 1
- '1.1' - '1.1'
- foo - foo
name: elems (ok, extra elems ignored 2) name: elems (ok, extra elems ignored 2)
schema: *14 schema: *15
valid: 1 valid: 1
- -
input: input:
- 1 - 1
name: elems (ok, create_default=0) name: elems (ok, create_default=0)
output: output:
- 1 - 1
schema: &15 schema: &16
- array - array
- -
elems: elems:
Expand All @@ -1056,6 +1115,6 @@ tests:
output: output:
- 1 - 1
- 2 - 2
schema: *15 schema: *16
valid: 1 valid: 1
version: v0.9.22 (generated by devscripts/gen-type-spectest on Tue Dec 4 16:54:51 2012) version: v0.9.22 (generated by devscripts/gen-type-spectest on Fri Jan 11 13:35:48 2013)
51 changes: 44 additions & 7 deletions share/spectest/10-type-bool.yaml
Expand Up @@ -75,6 +75,33 @@ tests:
- [] - []


valid: 0 valid: 0
-
dies: 1
input: 1
name: clause (dies, unknown clause)
schema:
- bool*
- clause
- foo
-
dies: 1
input: 1
name: clset (dies, unknown clause)
schema:
- bool*
- clset
-
foo: 1
-
dies: 1
input: 1
name: clset (dies, unknown attr)
schema:
- bool*
- clset
-
min_len: 1
min_len.foo: 1
- -
input: 1 input: 1
name: clset (empty = ok) name: clset (empty = ok)
Expand All @@ -84,6 +111,16 @@ tests:
- {} - {}


valid: 1 valid: 1
-
input: 1
name: clset (ignored clause/attr = ok)
schema:
- bool*
- clset
-
_foo: 1
foo._bar: 2
valid: 1
- -
input: 1 input: 1
name: .err_level=error (clause=is, ok) name: .err_level=error (clause=is, ok)
Expand Down Expand Up @@ -215,7 +252,7 @@ tests:
- 1 - 1
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: is& (nok + nok) name: is& (nok + nok)
schema: schema:
Expand Down Expand Up @@ -273,7 +310,7 @@ tests:
- and - and
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: is.op=and (nok + nok) name: is.op=and (nok + nok)
schema: schema:
Expand Down Expand Up @@ -441,7 +478,7 @@ tests:
- none - none
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: is.op=none (ok + ok) name: is.op=none (ok + ok)
schema: schema:
Expand Down Expand Up @@ -551,7 +588,7 @@ tests:
- *3 - *3
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: in& (nok + nok) name: in& (nok + nok)
schema: schema:
Expand Down Expand Up @@ -610,7 +647,7 @@ tests:
- and - and
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: in.op=and (nok + nok) name: in.op=and (nok + nok)
schema: schema:
Expand Down Expand Up @@ -778,7 +815,7 @@ tests:
- none - none
valid: 0 valid: 0
- -
errors: 2 errors: 1
input: 0 input: 0
name: in.op=none (ok + ok) name: in.op=none (ok + ok)
schema: schema:
Expand Down Expand Up @@ -1012,4 +1049,4 @@ tests:
- is_true - is_true
- ~ - ~
valid: 1 valid: 1
version: v0.9.22 (generated by devscripts/gen-type-spectest on Tue Dec 4 16:54:51 2012) version: v0.9.22 (generated by devscripts/gen-type-spectest on Fri Jan 11 13:35:48 2013)

0 comments on commit ee8248a

Please sign in to comment.