aboutsummaryrefslogtreecommitdiff
path: root/test-suite/tests/valid
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/valid')
-rw-r--r--test-suite/tests/valid/array-mixed-types-arrays-and-ints.json11
-rw-r--r--test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml1
-rw-r--r--test-suite/tests/valid/array-mixed-types-ints-and-floats.json9
-rw-r--r--test-suite/tests/valid/array-mixed-types-ints-and-floats.toml1
-rw-r--r--test-suite/tests/valid/array-mixed-types-strings-and-ints.json9
-rw-r--r--test-suite/tests/valid/array-mixed-types-strings-and-ints.toml1
-rw-r--r--test-suite/tests/valid/example-v0.4.0.toml3
7 files changed, 34 insertions, 1 deletions
diff --git a/test-suite/tests/valid/array-mixed-types-arrays-and-ints.json b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.json
new file mode 100644
index 0000000..10074ec
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.json
@@ -0,0 +1,11 @@
+{
+ "arrays-and-ints": {
+ "type": "array",
+ "value": [
+ {"type": "integer", "value": "1"},
+ {"type": "array", "value": [
+ { "type": "string", "value":"Arrays are not integers."}
+ ]}
+ ]
+ }
+}
diff --git a/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml
new file mode 100644
index 0000000..051ec73
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-arrays-and-ints.toml
@@ -0,0 +1 @@
+arrays-and-ints = [1, ["Arrays are not integers."]]
diff --git a/test-suite/tests/valid/array-mixed-types-ints-and-floats.json b/test-suite/tests/valid/array-mixed-types-ints-and-floats.json
new file mode 100644
index 0000000..c90665e
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-ints-and-floats.json
@@ -0,0 +1,9 @@
+{
+ "ints-and-floats": {
+ "type": "array",
+ "value": [
+ {"type": "integer", "value": "1"},
+ {"type": "float", "value": "1.1"}
+ ]
+ }
+}
diff --git a/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml b/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml
new file mode 100644
index 0000000..a5aa9b7
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-ints-and-floats.toml
@@ -0,0 +1 @@
+ints-and-floats = [1, 1.1]
diff --git a/test-suite/tests/valid/array-mixed-types-strings-and-ints.json b/test-suite/tests/valid/array-mixed-types-strings-and-ints.json
new file mode 100644
index 0000000..8ae322e
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-strings-and-ints.json
@@ -0,0 +1,9 @@
+{
+ "strings-and-ints": {
+ "type": "array",
+ "value": [
+ {"type": "string", "value": "hi"},
+ {"type": "integer", "value": "42"}
+ ]
+ }
+}
diff --git a/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml b/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml
new file mode 100644
index 0000000..f348308
--- /dev/null
+++ b/test-suite/tests/valid/array-mixed-types-strings-and-ints.toml
@@ -0,0 +1 @@
+strings-and-ints = ["hi", 42]
diff --git a/test-suite/tests/valid/example-v0.4.0.toml b/test-suite/tests/valid/example-v0.4.0.toml
index ffbcce0..69f1c1b 100644
--- a/test-suite/tests/valid/example-v0.4.0.toml
+++ b/test-suite/tests/valid/example-v0.4.0.toml
@@ -170,7 +170,8 @@ False = false
## Array
# Arrays are square brackets with other primitives inside. Whitespace is
-# ignored. Elements are separated by commas. Data types may not be mixed.
+# ignored. Elements are separated by commas. Since 2019-11-06 data types can be
+# mixed.
[array]