summaryrefslogtreecommitdiff
path: root/tests/files/success/test_type_number.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/files/success/test_type_number.yaml')
-rw-r--r--tests/files/success/test_type_number.yaml76
1 files changed, 76 insertions, 0 deletions
diff --git a/tests/files/success/test_type_number.yaml b/tests/files/success/test_type_number.yaml
new file mode 100644
index 0000000..f0b5cb4
--- /dev/null
+++ b/tests/files/success/test_type_number.yaml
@@ -0,0 +1,76 @@
+---
+name: type-number-1
+desc: Most basic test for type number
+data: '1337.0'
+schema:
+ type: number
+---
+name: type-number-2
+desc: Test that number type works with as value in map
+data:
+ foo: 1337
+ bar: 3.14159
+ qwe: 0.0
+ rty: '1337'
+ ewq: '3.14159'
+ dsa: '0.0'
+schema:
+ type: map
+ mapping:
+ foo:
+ type: number
+ bar:
+ type: number
+ qwe:
+ type: number
+ rty:
+ type: number
+ ewq:
+ type: number
+ dsa:
+ type: number
+---
+name: type-number-3
+desc: Test that different number values works as values in seq
+data:
+ - 1337
+ - 3.14159
+ - 0.0
+ - '1337'
+ - '3.14159'
+ - '0.0'
+schema:
+ type: seq
+ sequence:
+ - type: number
+---
+name: type-number-4
+desc: Test that number type works inside nested map, seq, map
+data:
+ foobar:
+ - foo: 1337
+ bar: 3.14159
+ qwe: 0.0
+ rty: '1337'
+ ewq: '3.14159'
+ dsa: '0.0'
+schema:
+ type: map
+ mapping:
+ foobar:
+ type: seq
+ sequence:
+ - type: map
+ mapping:
+ foo:
+ type: number
+ bar:
+ type: number
+ qwe:
+ type: number
+ rty:
+ type: number
+ ewq:
+ type: number
+ dsa:
+ type: number