From b14640f94fdfee2b8dc92f46c0358bd5ccae1877 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Thu, 5 Feb 2026 14:35:27 +0100 Subject: [PATCH 01/11] Update the code generator to match the formatting of ./Scripts/format.sh --- .../TOMLSingleValueDecodingContainer.Generated.swift | 2 +- .../TOMLDecoder/gyb/TOMLSingleValueDecodingContainer.swift.gyb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/TOMLDecoder/TOMLSingleValueDecodingContainer.Generated.swift b/Sources/TOMLDecoder/TOMLSingleValueDecodingContainer.Generated.swift index 3526ad3c..c4edc9da 100644 --- a/Sources/TOMLDecoder/TOMLSingleValueDecodingContainer.Generated.swift +++ b/Sources/TOMLDecoder/TOMLSingleValueDecodingContainer.Generated.swift @@ -232,7 +232,7 @@ extension _TOMLDecoder: SingleValueDecodingContainer { } @inline(__always) - func decode(_ type: T.Type) throws -> T where T: Decodable { + func decode(_ type: T.Type) throws -> T { if type == Bool.self { return try decode(Bool.self) as! T } else if type == String.self { diff --git a/Sources/TOMLDecoder/gyb/TOMLSingleValueDecodingContainer.swift.gyb b/Sources/TOMLDecoder/gyb/TOMLSingleValueDecodingContainer.swift.gyb index b7925f52..605a38c7 100644 --- a/Sources/TOMLDecoder/gyb/TOMLSingleValueDecodingContainer.swift.gyb +++ b/Sources/TOMLDecoder/gyb/TOMLSingleValueDecodingContainer.swift.gyb @@ -78,7 +78,7 @@ extension _TOMLDecoder: SingleValueDecodingContainer { } @inline(__always) - func decode(_ type: T.Type) throws -> T where T: Decodable { + func decode(_ type: T.Type) throws -> T { % for i, type_name in enumerate([t[0] for t in native_types] + int_types + ["Double", "Float"]): ${"if" if i == 0 else "} else if"} type == ${type_name}.self { return try decode(${type_name}.self) as! T From ec115ccae65c9e83c8b84d4a052c0bbb7c01c99b Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 18:34:19 +0100 Subject: [PATCH 02/11] Reformat the code This commit is a result of `./Scripts/format.sh` --- Sources/TOMLDecoder/Parsing/Parser.swift | 24 ++++++++++++------- .../TOMLDecoder/Parsing/TOMLDocument.swift | 4 ---- Sources/TOMLDecoder/Parsing/Token.swift | 6 ----- Sources/TOMLDecoder/TOMLDecoder.swift | 3 +-- .../TOMLKeyedDecodingContainer.swift | 4 ++-- .../TOMLUnkeyedDecodingContainer.swift | 10 ++++---- Sources/TOMLDecoder/_TOMLDecoder.swift | 2 +- Sources/compliance/main.swift | 2 +- .../Support/TOMLComplianceSupport.swift | 4 ++-- 9 files changed, 27 insertions(+), 32 deletions(-) diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index b2a9733a..7ba82438 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -67,14 +67,16 @@ struct Parser: ~Copyable { .syntax( lineNumber: lineNumber, message: "control characters are not allowed in comments" - )) + ) + ) } } else { throw TOMLError( .syntax( lineNumber: lineNumber, message: "control characters are not allowed in comments" - )) + ) + ) } } position += 1 @@ -128,7 +130,8 @@ struct Parser: ~Copyable { .syntax( lineNumber: lineNumber, message: "bare carriage return is not allowed" - )) + ) + ) default: break } @@ -181,7 +184,8 @@ struct Parser: ~Copyable { guard i < range.upperBound else { throw TOMLError( - .syntax(lineNumber: lineNumber, message: "unterminated triple-s-quote")) + .syntax(lineNumber: lineNumber, message: "unterminated triple-s-quote") + ) } let end = i + 3 @@ -221,7 +225,8 @@ struct Parser: ~Copyable { guard i < range.upperBound else { throw TOMLError( - .syntax(lineNumber: lineNumber, message: "unterminated triple-d-quote")) + .syntax(lineNumber: lineNumber, message: "unterminated triple-d-quote") + ) } let end = i + 3 @@ -244,7 +249,8 @@ struct Parser: ~Copyable { if i >= textCount || bytes[i] != CodeUnits.singleQuote { throw TOMLError( - .syntax(lineNumber: lineNumber, message: "unterminated s-quote")) + .syntax(lineNumber: lineNumber, message: "unterminated s-quote") + ) } emitToken(kind: .string, start: start, end: i + 1) @@ -286,7 +292,8 @@ struct Parser: ~Copyable { if i >= range.upperBound || bytes[i] != CodeUnits.doubleQuote { throw TOMLError( - .syntax(lineNumber: lineNumber, message: "unterminated quote")) + .syntax(lineNumber: lineNumber, message: "unterminated quote") + ) } emitToken(kind: .string, start: start, end: i + 1) @@ -1512,7 +1519,8 @@ func basicString(bytes: UnsafeBufferPointer, range: Range, multiline lineNumber: 0, message: "basic multiline strings cannot contain more than 2 consecutive double quotes" - )) + ) + ) } } else { consecutiveQuotes = 0 diff --git a/Sources/TOMLDecoder/Parsing/TOMLDocument.swift b/Sources/TOMLDecoder/Parsing/TOMLDocument.swift index 221cdfac..d5a250ff 100644 --- a/Sources/TOMLDecoder/Parsing/TOMLDocument.swift +++ b/Sources/TOMLDecoder/Parsing/TOMLDocument.swift @@ -114,10 +114,6 @@ struct KeyValuePair: Equatable { let key: String let keyHash: Int var value: Token - - static func == (lhs: Self, rhs: Self) -> Bool { - lhs.keyHash == rhs.keyHash && lhs.key == rhs.key && lhs.value == rhs.value - } } struct InternalTOMLTable: Equatable, Sendable { diff --git a/Sources/TOMLDecoder/Parsing/Token.swift b/Sources/TOMLDecoder/Parsing/Token.swift index c9cce2c4..82775cd0 100644 --- a/Sources/TOMLDecoder/Parsing/Token.swift +++ b/Sources/TOMLDecoder/Parsing/Token.swift @@ -18,12 +18,6 @@ struct Token: Equatable { let text: Range static let empty = Token(kind: .newline, lineNumber: 1, text: 0 ..< 0) - - init(kind: Kind, lineNumber: Int, text: Range) { - self.kind = kind - self.lineNumber = lineNumber - self.text = text - } } extension Token { diff --git a/Sources/TOMLDecoder/TOMLDecoder.swift b/Sources/TOMLDecoder/TOMLDecoder.swift index 576a00bc..68d570c9 100644 --- a/Sources/TOMLDecoder/TOMLDecoder.swift +++ b/Sources/TOMLDecoder/TOMLDecoder.swift @@ -297,7 +297,7 @@ func snakeCasify(_ stringKey: String) -> String { } // Do a cheap isEmpty check before creating and appending potentially empty strings - let result: String = if leadingUnderscoreRange.isEmpty, trailingUnderscoreRange.isEmpty { + return if leadingUnderscoreRange.isEmpty, trailingUnderscoreRange.isEmpty { joinedString } else if !leadingUnderscoreRange.isEmpty, !trailingUnderscoreRange.isEmpty { // Both leading and trailing underscores @@ -309,5 +309,4 @@ func snakeCasify(_ stringKey: String) -> String { // Just trailing joinedString + String(stringKey[trailingUnderscoreRange]) } - return result } diff --git a/Sources/TOMLDecoder/TOMLKeyedDecodingContainer.swift b/Sources/TOMLDecoder/TOMLKeyedDecodingContainer.swift index 39e4cfa5..d6d5e54b 100644 --- a/Sources/TOMLDecoder/TOMLKeyedDecodingContainer.swift +++ b/Sources/TOMLDecoder/TOMLKeyedDecodingContainer.swift @@ -42,7 +42,7 @@ struct TOMLKeyedDecodingContainer: KeyedDecodingContainerProtoco } } - func decode(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable { + func decode(_ type: T.Type, forKey key: Key) throws -> T { if type == TOMLArray.self { return try decode(TOMLArray.self, forKey: key) as! T } else if type == TOMLTable.self { @@ -95,7 +95,7 @@ struct TOMLKeyedDecodingContainer: KeyedDecodingContainerProtoco return try T(from: decoder) } - func nestedContainer(keyedBy _: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer where NestedKey: CodingKey { + func nestedContainer(keyedBy _: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer { do { let nestedTable = try table.table(forKey: key.stringValue) var nestedCodingPath = codingPath diff --git a/Sources/TOMLDecoder/TOMLUnkeyedDecodingContainer.swift b/Sources/TOMLDecoder/TOMLUnkeyedDecodingContainer.swift index 9f082dae..f71c9ac3 100644 --- a/Sources/TOMLDecoder/TOMLUnkeyedDecodingContainer.swift +++ b/Sources/TOMLDecoder/TOMLUnkeyedDecodingContainer.swift @@ -60,7 +60,7 @@ struct TOMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { } } - mutating func decode(_ type: T.Type) throws -> T where T: Decodable { + mutating func decode(_ type: T.Type) throws -> T { if type == TOMLArray.self { return try decode(TOMLArray.self) as! T } else if type == TOMLTable.self { @@ -75,12 +75,10 @@ struct TOMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { // Try to get nested table or array if let nestedTable = try? array.table(atIndex: currentIndex) { let nestedDecoder = _TOMLDecoder(referencing: .keyed(nestedTable), at: nestedCodingPath, strategy: decoder.strategy, isLenient: decoder.isLenient) - let decoded = try T(from: nestedDecoder) - return decoded + return try T(from: nestedDecoder) } else if let nestedArray = try? array.array(atIndex: currentIndex) { let nestedDecoder = _TOMLDecoder(referencing: .unkeyed(nestedArray), at: nestedCodingPath, strategy: decoder.strategy, isLenient: decoder.isLenient) - let decoded = try T(from: nestedDecoder) - return decoded + return try T(from: nestedDecoder) } let token = try array.token(forIndex: currentIndex, type: String(describing: T.self)) @@ -111,7 +109,7 @@ struct TOMLUnkeyedDecodingContainer: UnkeyedDecodingContainer { return try T(from: decoder) } - mutating func nestedContainer(keyedBy _: NestedKey.Type) throws -> KeyedDecodingContainer where NestedKey: CodingKey { + mutating func nestedContainer(keyedBy _: NestedKey.Type) throws -> KeyedDecodingContainer { guard !isAtEnd else { throw DecodingError.valueNotFound( KeyedDecodingContainer.self, diff --git a/Sources/TOMLDecoder/_TOMLDecoder.swift b/Sources/TOMLDecoder/_TOMLDecoder.swift index c1159c34..d46600d8 100644 --- a/Sources/TOMLDecoder/_TOMLDecoder.swift +++ b/Sources/TOMLDecoder/_TOMLDecoder.swift @@ -20,7 +20,7 @@ final class _TOMLDecoder: Decoder { } } - func container(keyedBy _: Key.Type) throws -> KeyedDecodingContainer where Key: CodingKey { + func container(keyedBy _: Key.Type) throws -> KeyedDecodingContainer { guard case let .keyed(table) = container else { throw DecodingError.valueNotFound( KeyedDecodingContainer.self, diff --git a/Sources/compliance/main.swift b/Sources/compliance/main.swift index 670e7506..6ed62119 100644 --- a/Sources/compliance/main.swift +++ b/Sources/compliance/main.swift @@ -3,7 +3,7 @@ import Foundation import TOMLDecoder -// iOS 13+ compatible date formatter functions +/// iOS 13+ compatible date formatter functions private func createISO8601FullFormatter() -> ISO8601DateFormatter { let formatter = ISO8601DateFormatter() formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] diff --git a/Tests/TOMLDecoderTests/Support/TOMLComplianceSupport.swift b/Tests/TOMLDecoderTests/Support/TOMLComplianceSupport.swift index 9668e8c1..8a93c6de 100644 --- a/Tests/TOMLDecoderTests/Support/TOMLComplianceSupport.swift +++ b/Tests/TOMLDecoderTests/Support/TOMLComplianceSupport.swift @@ -3,8 +3,8 @@ import ProlepticGregorianTestHelpers import Testing import TOMLDecoder -// The Foundation does not use a gregorian calendar for dates prior to the cutoff on 1582-10-04. -// To get a strict proleptic Gregorian calendar per RFC 8949 §3.4.1.2, we use the ProlepticGregorianTestHelpers module +/// The Foundation does not use a gregorian calendar for dates prior to the cutoff on 1582-10-04. +/// To get a strict proleptic Gregorian calendar per RFC 8949 §3.4.1.2, we use the ProlepticGregorianTestHelpers module func epochSecondsViaProlepticHelper( year: Int, month: Int = 1, day: Int = 1, hour: Int = 0, minute: Int = 0, second: Int = 0 From bc31213f07dd74cccc3e17c6d9defca1d5143238 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 12:14:49 +0100 Subject: [PATCH 03/11] Fix file name mistake in the header of Generated swift files The file is called Scripts/generate-tests.py not Scripts/sync_compliance_tests.py --- Scripts/generate-tests.py | 6 +++--- Tests/TOMLDecoderTests/InvalidationTests.Generated.swift | 2 +- Tests/TOMLDecoderTests/Support/Tags.Generated.swift | 2 +- Tests/TOMLDecoderTests/ValidationTests.Generated.swift | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Scripts/generate-tests.py b/Scripts/generate-tests.py index 6761f61d..bb20f7c9 100755 --- a/Scripts/generate-tests.py +++ b/Scripts/generate-tests.py @@ -144,7 +144,7 @@ def _generate_tags_file(tags: set[str], commit: str, spec_version: str) -> str: tag_declarations = _generate_tag_declarations(tags) template = textwrap.dedent( - """// Generated by Scripts/sync_compliance_tests.py + """// Generated by Scripts/generate-tests.py // Source: toml-test commit __COMMIT__ (spec __SPEC_VERSION__) import Testing @@ -209,7 +209,7 @@ def _generate_valid_test_file(fixtures: Iterable[str], commit: str, spec_version tests_block = "\n".join(tests).rstrip() template = textwrap.dedent( - """// Generated by Scripts/sync_compliance_tests.py + """// Generated by Scripts/generate-tests.py // Source: toml-test commit __COMMIT__ (spec __SPEC_VERSION__) import Foundation @@ -268,7 +268,7 @@ def _generate_invalid_test_file(fixtures: Iterable[str], commit: str, spec_versi tests_block = "\n".join(tests).rstrip() template = textwrap.dedent( - """// Generated by Scripts/sync_compliance_tests.py + """// Generated by Scripts/generate-tests.py // Source: toml-test commit __COMMIT__ (spec __SPEC_VERSION__) import Foundation diff --git a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift index d1a1a325..d1271939 100644 --- a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift @@ -1,4 +1,4 @@ -// Generated by Scripts/sync_compliance_tests.py +// Generated by Scripts/generate-tests.py // Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) import Foundation diff --git a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift index 9d8d4493..a7858d47 100644 --- a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift +++ b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift @@ -1,4 +1,4 @@ -// Generated by Scripts/sync_compliance_tests.py +// Generated by Scripts/generate-tests.py // Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) import Testing diff --git a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift index 5d5da967..4ae478c8 100644 --- a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift @@ -1,4 +1,4 @@ -// Generated by Scripts/sync_compliance_tests.py +// Generated by Scripts/generate-tests.py // Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) import Foundation From 3eeb2a9dc003bc382c517f64ac357525aee601e6 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 15:43:45 +0100 Subject: [PATCH 04/11] Prefactoring: get rid of magic constant 8 This prefactoring will be important in later commits when I add support for optional seconds (TOML 1.1.0) cause it won't longer be constant 8 but either 8 or 5 (depending on wheter the seconds are presented or not) The magic constant 8 comes from scanTime where in case of success (not nil value is returned) the total increment to the index variable equals to 8 --- Sources/TOMLDecoder/Parsing/Parser.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 7ba82438..81d0610e 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -1258,7 +1258,7 @@ extension Token { // For standalone time values, don't advance index mustParseTime = true } - if let (hour, minute, second, _) = scanTime(bytes: bytes, range: index ..< text.upperBound) { + if let (hour, minute, second, newIndex) = scanTime(bytes: bytes, range: index ..< text.upperBound) { // Validate time components if hour > 23 { throw TOMLError(.invalidDateTime3(context: context, lineNumber: lineNumber, reason: "hour must be between 00 and 23")) @@ -1272,7 +1272,7 @@ extension Token { time = (hour, minute, second) - index += 8 + index = newIndex if index < text.upperBound, bytes[index] == CodeUnits.dot { index += 1 let beforeNanoIndex = index From d7b3d572e745be19dc58c730a80d0e3a0c09c1a5 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 12:22:59 +0100 Subject: [PATCH 05/11] Bump toml-test None of the tests are failing after the bump --- Scripts/generate-tests.py | 2 +- .../InvalidationTests.Generated.swift | 364 ++---------------- .../Support/Tags.Generated.swift | 2 +- .../ValidationTests.Generated.swift | 110 +++--- .../array/double-comma-01.toml | 2 +- .../array/double-comma-02.toml | 2 +- .../array/double-comma-1.toml | 1 - .../array/double-comma-2.toml | 1 - .../invalid_fixtures/array/no-close-01.toml | 2 +- .../invalid_fixtures/array/no-close-02.toml | 2 +- .../invalid_fixtures/array/no-close-03.toml | 2 +- .../invalid_fixtures/array/no-close-04.toml | 2 +- .../invalid_fixtures/array/no-close-05.toml | 2 +- .../invalid_fixtures/array/no-close-06.toml | 2 +- .../invalid_fixtures/array/no-close-07.toml | 2 +- .../invalid_fixtures/array/no-close-08.toml | 2 +- .../invalid_fixtures/array/no-close-1.toml | 1 - .../invalid_fixtures/array/no-close-2.toml | 1 - .../invalid_fixtures/array/no-close-3.toml | 1 - .../invalid_fixtures/array/no-close-4.toml | 1 - .../invalid_fixtures/array/no-close-5.toml | 1 - .../invalid_fixtures/array/no-close-6.toml | 1 - .../invalid_fixtures/array/no-close-7.toml | 1 - .../invalid_fixtures/array/no-close-8.toml | 1 - .../invalid_fixtures/array/no-comma-01.toml | 2 +- .../invalid_fixtures/array/no-comma-02.toml | 2 +- .../invalid_fixtures/array/no-comma-03.toml | 2 +- .../invalid_fixtures/array/no-comma-1.toml | 1 - .../invalid_fixtures/array/no-comma-2.toml | 1 - .../invalid_fixtures/array/no-comma-3.toml | 1 - .../invalid_fixtures/array/only-comma-01.toml | 2 +- .../invalid_fixtures/array/only-comma-02.toml | 2 +- .../invalid_fixtures/array/only-comma-1.toml | 1 - .../invalid_fixtures/array/only-comma-2.toml | 1 - .../invalid_fixtures/control/multi-cr.toml | 1 - .../invalid_fixtures/control/rawmulti-cr.toml | 1 - .../datetime/offset-overflow-minute.toml | 4 +- .../invalid_fixtures/float/double-dot-01.toml | 2 +- .../invalid_fixtures/float/double-dot-02.toml | 2 +- .../float/double-point-1.toml | 1 - .../float/double-point-2.toml | 1 - .../invalid_fixtures/float/exp-dot-01.toml | 2 +- .../invalid_fixtures/float/exp-dot-02.toml | 2 +- .../invalid_fixtures/float/exp-dot-03.toml | 2 +- .../float/exp-double-e-01.toml | 2 +- .../float/exp-double-e-02.toml | 2 +- .../float/exp-double-e-1.toml | 1 - .../float/exp-double-e-2.toml | 1 - .../invalid_fixtures/float/exp-point-1.toml | 1 - .../invalid_fixtures/float/exp-point-2.toml | 1 - .../invalid_fixtures/float/exp-point-3.toml | 1 - .../float/exp-trailing-us-01.toml | 2 +- .../float/exp-trailing-us-02.toml | 2 +- .../float/exp-trailing-us-1.toml | 1 - .../float/exp-trailing-us-2.toml | 1 - .../float/inf-incomplete-01.toml | 2 +- .../float/inf-incomplete-02.toml | 2 +- .../float/inf-incomplete-03.toml | 2 +- .../float/inf-incomplete-1.toml | 1 - .../float/inf-incomplete-2.toml | 1 - .../float/inf-incomplete-3.toml | 1 - .../float/leading-dot-neg.toml | 2 +- .../float/leading-dot-plus.toml | 2 +- .../invalid_fixtures/float/leading-dot.toml | 2 +- .../float/leading-point-neg.toml | 1 - .../float/leading-point-plus.toml | 1 - .../invalid_fixtures/float/leading-point.toml | 1 - .../float/nan-incomplete-01.toml | 2 +- .../float/nan-incomplete-02.toml | 2 +- .../float/nan-incomplete-03.toml | 2 +- .../float/nan-incomplete-1.toml | 1 - .../float/nan-incomplete-2.toml | 1 - .../float/nan-incomplete-3.toml | 1 - .../float/trailing-dot-min.toml | 2 +- .../float/trailing-dot-plus.toml | 2 +- .../invalid_fixtures/float/trailing-dot.toml | 1 + .../float/trailing-exp-dot.toml | 1 + .../float/trailing-exp-point.toml | 1 - .../float/trailing-point-min.toml | 1 - .../float/trailing-point-plus.toml | 1 - .../float/trailing-point.toml | 1 - .../invalid_fixtures/float/us-after-dot.toml | 2 +- .../float/us-after-point.toml | 1 - .../invalid_fixtures/float/us-before-dot.toml | 2 +- .../float/us-before-point.toml | 1 - .../integer/invalid-hex-01.toml | 2 +- .../integer/invalid-hex-02.toml | 2 +- .../integer/invalid-hex-1.toml | 1 - .../integer/invalid-hex-2.toml | 1 - .../integer/leading-zero-01.toml | 2 +- .../integer/leading-zero-02.toml | 2 +- .../integer/leading-zero-03.toml | 2 +- .../integer/leading-zero-1.toml | 1 - .../integer/leading-zero-2.toml | 1 - .../integer/leading-zero-3.toml | 1 - .../integer/leading-zero-sign-01.toml | 2 +- .../integer/leading-zero-sign-02.toml | 2 +- .../integer/leading-zero-sign-03.toml | 2 +- .../integer/leading-zero-sign-1.toml | 1 - .../integer/leading-zero-sign-2.toml | 1 - .../integer/leading-zero-sign-3.toml | 1 - .../key/duplicate-keys-08.toml | 2 + .../key/duplicate-keys-09.toml | 2 + .../string/bad-hex-esc-01.toml | 2 +- .../string/bad-hex-esc-02.toml | 2 +- .../string/bad-hex-esc-03.toml | 2 +- .../string/bad-hex-esc-04.toml | 2 +- .../string/bad-hex-esc-1.toml | 1 - .../string/bad-hex-esc-2.toml | 1 - .../string/bad-hex-esc-3.toml | 1 - .../string/bad-hex-esc-4.toml | 1 - .../string/bad-uni-esc-01.toml | 2 +- .../string/bad-uni-esc-02.toml | 2 +- .../string/bad-uni-esc-03.toml | 2 +- .../string/bad-uni-esc-04.toml | 2 +- .../string/bad-uni-esc-05.toml | 2 +- .../string/bad-uni-esc-06.toml | 2 +- .../string/bad-uni-esc-07.toml | 2 +- .../string/bad-uni-esc-1.toml | 1 - .../string/bad-uni-esc-2.toml | 1 - .../string/bad-uni-esc-3.toml | 1 - .../string/bad-uni-esc-4.toml | 1 - .../string/bad-uni-esc-5.toml | 1 - .../string/bad-uni-esc-6.toml | 1 - .../string/bad-uni-esc-7.toml | 1 - .../string/bad-uni-esc-ml-01.toml | 1 + .../string/bad-uni-esc-ml-02.toml | 1 + .../string/bad-uni-esc-ml-03.toml | 1 + .../string/bad-uni-esc-ml-04.toml | 1 + .../string/bad-uni-esc-ml-05.toml | 1 + .../string/bad-uni-esc-ml-06.toml | 1 + .../string/bad-uni-esc-ml-07.toml | 1 + .../string/bad-uni-esc-ml-1.toml | 1 - .../string/bad-uni-esc-ml-2.toml | 1 - .../string/bad-uni-esc-ml-3.toml | 1 - .../string/bad-uni-esc-ml-4.toml | 1 - .../string/bad-uni-esc-ml-5.toml | 1 - .../string/bad-uni-esc-ml-6.toml | 1 - .../string/bad-uni-esc-ml-7.toml | 1 - ...-comma.json => string-quote-comma-01.json} | 0 ...-comma.toml => string-quote-comma-01.toml} | 0 ...omma-2.json => string-quote-comma-02.json} | 0 ...omma-2.toml => string-quote-comma-02.toml} | 0 ...h-comma.json => string-with-comma-01.json} | 0 ...h-comma.toml => string-with-comma-01.toml} | 0 ...comma-2.json => string-with-comma-02.json} | 0 ...comma-2.toml => string-with-comma-02.toml} | 0 .../{key-dotted-1.json => key-dotted-01.json} | 0 .../{key-dotted-1.toml => key-dotted-01.toml} | 0 .../{key-dotted-2.json => key-dotted-02.json} | 0 .../{key-dotted-2.toml => key-dotted-02.toml} | 0 .../{key-dotted-3.json => key-dotted-03.json} | 0 .../{key-dotted-3.toml => key-dotted-03.toml} | 0 .../{key-dotted-4.json => key-dotted-04.json} | 0 .../{key-dotted-4.toml => key-dotted-04.toml} | 0 .../{key-dotted-5.json => key-dotted-05.json} | 0 .../{key-dotted-5.toml => key-dotted-05.toml} | 0 .../{key-dotted-6.json => key-dotted-06.json} | 0 .../{key-dotted-6.toml => key-dotted-06.toml} | 0 .../{key-dotted-7.json => key-dotted-07.json} | 0 .../{key-dotted-7.toml => key-dotted-07.toml} | 0 .../key/{dotted-1.json => dotted-01.json} | 0 .../key/{dotted-1.toml => dotted-01.toml} | 0 .../key/{dotted-2.json => dotted-02.json} | 0 .../key/{dotted-2.toml => dotted-02.toml} | 0 .../key/{dotted-3.json => dotted-03.json} | 0 .../key/{dotted-3.toml => dotted-03.toml} | 0 .../key/{dotted-4.json => dotted-04.json} | 0 .../key/{dotted-4.toml => dotted-04.toml} | 0 .../key/{empty-1.json => empty-01.json} | 0 .../key/{empty-1.toml => empty-01.toml} | 0 .../key/{empty-2.json => empty-02.json} | 0 .../key/{empty-2.toml => empty-02.toml} | 0 .../key/{empty-3.json => empty-03.json} | 0 .../key/{empty-3.toml => empty-03.toml} | 0 .../valid_fixtures/spec-1.0.0/string-6.json | 7 +- 176 files changed, 171 insertions(+), 510 deletions(-) delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-4.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-5.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-6.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-7.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-8.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-neg.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-plus.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-3.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-dot.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-point.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-min.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-plus.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-point.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-point.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-3.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-08.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-09.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-4.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-4.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-5.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-6.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-7.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-01.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-02.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-03.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-04.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-05.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-06.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-07.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-1.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-2.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-3.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-4.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-5.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-6.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-7.toml rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-quote-comma.json => string-quote-comma-01.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-quote-comma.toml => string-quote-comma-01.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-quote-comma-2.json => string-quote-comma-02.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-quote-comma-2.toml => string-quote-comma-02.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-with-comma.json => string-with-comma-01.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-with-comma.toml => string-with-comma-01.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-with-comma-2.json => string-with-comma-02.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/array/{string-with-comma-2.toml => string-with-comma-02.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-1.json => key-dotted-01.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-1.toml => key-dotted-01.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-2.json => key-dotted-02.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-2.toml => key-dotted-02.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-3.json => key-dotted-03.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-3.toml => key-dotted-03.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-4.json => key-dotted-04.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-4.toml => key-dotted-04.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-5.json => key-dotted-05.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-5.toml => key-dotted-05.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-6.json => key-dotted-06.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-6.toml => key-dotted-06.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-7.json => key-dotted-07.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/inline-table/{key-dotted-7.toml => key-dotted-07.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-1.json => dotted-01.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-1.toml => dotted-01.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-2.json => dotted-02.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-2.toml => dotted-02.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-3.json => dotted-03.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-3.toml => dotted-03.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-4.json => dotted-04.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{dotted-4.toml => dotted-04.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-1.json => empty-01.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-1.toml => empty-01.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-2.json => empty-02.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-2.toml => empty-02.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-3.json => empty-03.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/key/{empty-3.toml => empty-03.toml} (100%) diff --git a/Scripts/generate-tests.py b/Scripts/generate-tests.py index bb20f7c9..8667b955 100755 --- a/Scripts/generate-tests.py +++ b/Scripts/generate-tests.py @@ -20,7 +20,7 @@ DEFAULT_SPEC_VERSION = "1.0.0" TMP_ROOT = REPO_ROOT / "tmp" TOML_TEST_REPO_URL = "git@github.com:toml-lang/toml-test.git" -TOML_TEST_COMMIT = "8be0db7469af2d97449e0a06075a1a6ecdc60231" +TOML_TEST_COMMIT = "0ee318ae97ae5dec5f74aeccafbdc75f435580e2" TOML_TEST_DIR = TMP_ROOT / "toml-test" VALID_FIXTURES_DIR = REPO_ROOT / "Tests" / "TOMLDecoderTests" / "valid_fixtures" INVALID_FIXTURES_DIR = REPO_ROOT / "Tests" / "TOMLDecoderTests" / "invalid_fixtures" diff --git a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift index d1271939..7e7913eb 100644 --- a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) import Foundation import Testing @@ -29,16 +29,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["array", "double-comma-02"]) } - @Test("[array] double comma 1", .tags(.array)) - func array__double_comma_1() throws { - try invalidate(pathComponents: ["array", "double-comma-1"]) - } - - @Test("[array] double comma 2", .tags(.array)) - func array__double_comma_2() throws { - try invalidate(pathComponents: ["array", "double-comma-2"]) - } - @Test("[array] extend defined aot", .tags(.array)) func array__extend_defined_aot() throws { try invalidate(pathComponents: ["array", "extend-defined-aot"]) @@ -99,46 +89,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["array", "no-close-08"]) } - @Test("[array] no close 1", .tags(.array)) - func array__no_close_1() throws { - try invalidate(pathComponents: ["array", "no-close-1"]) - } - - @Test("[array] no close 2", .tags(.array)) - func array__no_close_2() throws { - try invalidate(pathComponents: ["array", "no-close-2"]) - } - - @Test("[array] no close 3", .tags(.array)) - func array__no_close_3() throws { - try invalidate(pathComponents: ["array", "no-close-3"]) - } - - @Test("[array] no close 4", .tags(.array)) - func array__no_close_4() throws { - try invalidate(pathComponents: ["array", "no-close-4"]) - } - - @Test("[array] no close 5", .tags(.array)) - func array__no_close_5() throws { - try invalidate(pathComponents: ["array", "no-close-5"]) - } - - @Test("[array] no close 6", .tags(.array)) - func array__no_close_6() throws { - try invalidate(pathComponents: ["array", "no-close-6"]) - } - - @Test("[array] no close 7", .tags(.array)) - func array__no_close_7() throws { - try invalidate(pathComponents: ["array", "no-close-7"]) - } - - @Test("[array] no close 8", .tags(.array)) - func array__no_close_8() throws { - try invalidate(pathComponents: ["array", "no-close-8"]) - } - @Test("[array] no close table 01", .tags(.array)) func array__no_close_table_01() throws { try invalidate(pathComponents: ["array", "no-close-table-01"]) @@ -164,21 +114,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["array", "no-comma-03"]) } - @Test("[array] no comma 1", .tags(.array)) - func array__no_comma_1() throws { - try invalidate(pathComponents: ["array", "no-comma-1"]) - } - - @Test("[array] no comma 2", .tags(.array)) - func array__no_comma_2() throws { - try invalidate(pathComponents: ["array", "no-comma-2"]) - } - - @Test("[array] no comma 3", .tags(.array)) - func array__no_comma_3() throws { - try invalidate(pathComponents: ["array", "no-comma-3"]) - } - @Test("[array] only comma 01", .tags(.array)) func array__only_comma_01() throws { try invalidate(pathComponents: ["array", "only-comma-01"]) @@ -189,16 +124,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["array", "only-comma-02"]) } - @Test("[array] only comma 1", .tags(.array)) - func array__only_comma_1() throws { - try invalidate(pathComponents: ["array", "only-comma-1"]) - } - - @Test("[array] only comma 2", .tags(.array)) - func array__only_comma_2() throws { - try invalidate(pathComponents: ["array", "only-comma-2"]) - } - @Test("[array] tables 01", .tags(.array)) func array__tables_01() throws { try invalidate(pathComponents: ["array", "tables-01"]) @@ -349,11 +274,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["control", "comment-us"]) } - @Test("[control] multi cr", .tags(.control)) - func control__multi_cr() throws { - try invalidate(pathComponents: ["control", "multi-cr"]) - } - @Test("[control] multi del", .tags(.control)) func control__multi_del() throws { try invalidate(pathComponents: ["control", "multi-del"]) @@ -389,11 +309,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["control", "only-vt"]) } - @Test("[control] rawmulti cr", .tags(.control)) - func control__rawmulti_cr() throws { - try invalidate(pathComponents: ["control", "rawmulti-cr"]) - } - @Test("[control] rawmulti del", .tags(.control)) func control__rawmulti_del() throws { try invalidate(pathComponents: ["control", "rawmulti-del"]) @@ -724,16 +639,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "double-dot-02"]) } - @Test("[float] double point 1", .tags(.float)) - func float__double_point_1() throws { - try invalidate(pathComponents: ["float", "double-point-1"]) - } - - @Test("[float] double point 2", .tags(.float)) - func float__double_point_2() throws { - try invalidate(pathComponents: ["float", "double-point-2"]) - } - @Test("[float] exp dot 01", .tags(.float)) func float__exp_dot_01() throws { try invalidate(pathComponents: ["float", "exp-dot-01"]) @@ -759,16 +664,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "exp-double-e-02"]) } - @Test("[float] exp double e 1", .tags(.float)) - func float__exp_double_e_1() throws { - try invalidate(pathComponents: ["float", "exp-double-e-1"]) - } - - @Test("[float] exp double e 2", .tags(.float)) - func float__exp_double_e_2() throws { - try invalidate(pathComponents: ["float", "exp-double-e-2"]) - } - @Test("[float] exp double us", .tags(.float)) func float__exp_double_us() throws { try invalidate(pathComponents: ["float", "exp-double-us"]) @@ -779,21 +674,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "exp-leading-us"]) } - @Test("[float] exp point 1", .tags(.float)) - func float__exp_point_1() throws { - try invalidate(pathComponents: ["float", "exp-point-1"]) - } - - @Test("[float] exp point 2", .tags(.float)) - func float__exp_point_2() throws { - try invalidate(pathComponents: ["float", "exp-point-2"]) - } - - @Test("[float] exp point 3", .tags(.float)) - func float__exp_point_3() throws { - try invalidate(pathComponents: ["float", "exp-point-3"]) - } - @Test("[float] exp trailing us", .tags(.float)) func float__exp_trailing_us() throws { try invalidate(pathComponents: ["float", "exp-trailing-us"]) @@ -809,16 +689,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "exp-trailing-us-02"]) } - @Test("[float] exp trailing us 1", .tags(.float)) - func float__exp_trailing_us_1() throws { - try invalidate(pathComponents: ["float", "exp-trailing-us-1"]) - } - - @Test("[float] exp trailing us 2", .tags(.float)) - func float__exp_trailing_us_2() throws { - try invalidate(pathComponents: ["float", "exp-trailing-us-2"]) - } - @Test("[float] inf capital", .tags(.float)) func float__inf_capital() throws { try invalidate(pathComponents: ["float", "inf-capital"]) @@ -839,21 +709,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "inf-incomplete-03"]) } - @Test("[float] inf incomplete 1", .tags(.float)) - func float__inf_incomplete_1() throws { - try invalidate(pathComponents: ["float", "inf-incomplete-1"]) - } - - @Test("[float] inf incomplete 2", .tags(.float)) - func float__inf_incomplete_2() throws { - try invalidate(pathComponents: ["float", "inf-incomplete-2"]) - } - - @Test("[float] inf incomplete 3", .tags(.float)) - func float__inf_incomplete_3() throws { - try invalidate(pathComponents: ["float", "inf-incomplete-3"]) - } - @Test("[float] inf underscore", .tags(.float)) func float__inf_underscore() throws { try invalidate(pathComponents: ["float", "inf_underscore"]) @@ -874,21 +729,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "leading-dot-plus"]) } - @Test("[float] leading point", .tags(.float)) - func float__leading_point() throws { - try invalidate(pathComponents: ["float", "leading-point"]) - } - - @Test("[float] leading point neg", .tags(.float)) - func float__leading_point_neg() throws { - try invalidate(pathComponents: ["float", "leading-point-neg"]) - } - - @Test("[float] leading point plus", .tags(.float)) - func float__leading_point_plus() throws { - try invalidate(pathComponents: ["float", "leading-point-plus"]) - } - @Test("[float] leading us", .tags(.float)) func float__leading_us() throws { try invalidate(pathComponents: ["float", "leading-us"]) @@ -929,26 +769,16 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "nan-incomplete-03"]) } - @Test("[float] nan incomplete 1", .tags(.float)) - func float__nan_incomplete_1() throws { - try invalidate(pathComponents: ["float", "nan-incomplete-1"]) - } - - @Test("[float] nan incomplete 2", .tags(.float)) - func float__nan_incomplete_2() throws { - try invalidate(pathComponents: ["float", "nan-incomplete-2"]) - } - - @Test("[float] nan incomplete 3", .tags(.float)) - func float__nan_incomplete_3() throws { - try invalidate(pathComponents: ["float", "nan-incomplete-3"]) - } - @Test("[float] nan underscore", .tags(.float)) func float__nan_underscore() throws { try invalidate(pathComponents: ["float", "nan_underscore"]) } + @Test("[float] trailing dot", .tags(.float)) + func float__trailing_dot() throws { + try invalidate(pathComponents: ["float", "trailing-dot"]) + } + @Test("[float] trailing dot 01", .tags(.float)) func float__trailing_dot_01() throws { try invalidate(pathComponents: ["float", "trailing-dot-01"]) @@ -974,6 +804,11 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "trailing-exp"]) } + @Test("[float] trailing exp dot", .tags(.float)) + func float__trailing_exp_dot() throws { + try invalidate(pathComponents: ["float", "trailing-exp-dot"]) + } + @Test("[float] trailing exp minus", .tags(.float)) func float__trailing_exp_minus() throws { try invalidate(pathComponents: ["float", "trailing-exp-minus"]) @@ -984,26 +819,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "trailing-exp-plus"]) } - @Test("[float] trailing exp point", .tags(.float)) - func float__trailing_exp_point() throws { - try invalidate(pathComponents: ["float", "trailing-exp-point"]) - } - - @Test("[float] trailing point", .tags(.float)) - func float__trailing_point() throws { - try invalidate(pathComponents: ["float", "trailing-point"]) - } - - @Test("[float] trailing point min", .tags(.float)) - func float__trailing_point_min() throws { - try invalidate(pathComponents: ["float", "trailing-point-min"]) - } - - @Test("[float] trailing point plus", .tags(.float)) - func float__trailing_point_plus() throws { - try invalidate(pathComponents: ["float", "trailing-point-plus"]) - } - @Test("[float] trailing us", .tags(.float)) func float__trailing_us() throws { try invalidate(pathComponents: ["float", "trailing-us"]) @@ -1024,21 +839,11 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["float", "us-after-dot"]) } - @Test("[float] us after point", .tags(.float)) - func float__us_after_point() throws { - try invalidate(pathComponents: ["float", "us-after-point"]) - } - @Test("[float] us before dot", .tags(.float)) func float__us_before_dot() throws { try invalidate(pathComponents: ["float", "us-before-dot"]) } - @Test("[float] us before point", .tags(.float)) - func float__us_before_point() throws { - try invalidate(pathComponents: ["float", "us-before-point"]) - } - @Test("[inline-table] bad key syntax", .tags(.inline_table)) func inline_table__bad_key_syntax() throws { try invalidate(pathComponents: ["inline-table", "bad-key-syntax"]) @@ -1244,16 +1049,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["integer", "invalid-hex-03"]) } - @Test("[integer] invalid hex 1", .tags(.integer)) - func integer__invalid_hex_1() throws { - try invalidate(pathComponents: ["integer", "invalid-hex-1"]) - } - - @Test("[integer] invalid hex 2", .tags(.integer)) - func integer__invalid_hex_2() throws { - try invalidate(pathComponents: ["integer", "invalid-hex-2"]) - } - @Test("[integer] invalid oct", .tags(.integer)) func integer__invalid_oct() throws { try invalidate(pathComponents: ["integer", "invalid-oct"]) @@ -1294,21 +1089,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["integer", "leading-zero-03"]) } - @Test("[integer] leading zero 1", .tags(.integer)) - func integer__leading_zero_1() throws { - try invalidate(pathComponents: ["integer", "leading-zero-1"]) - } - - @Test("[integer] leading zero 2", .tags(.integer)) - func integer__leading_zero_2() throws { - try invalidate(pathComponents: ["integer", "leading-zero-2"]) - } - - @Test("[integer] leading zero 3", .tags(.integer)) - func integer__leading_zero_3() throws { - try invalidate(pathComponents: ["integer", "leading-zero-3"]) - } - @Test("[integer] leading zero sign 01", .tags(.integer)) func integer__leading_zero_sign_01() throws { try invalidate(pathComponents: ["integer", "leading-zero-sign-01"]) @@ -1324,21 +1104,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["integer", "leading-zero-sign-03"]) } - @Test("[integer] leading zero sign 1", .tags(.integer)) - func integer__leading_zero_sign_1() throws { - try invalidate(pathComponents: ["integer", "leading-zero-sign-1"]) - } - - @Test("[integer] leading zero sign 2", .tags(.integer)) - func integer__leading_zero_sign_2() throws { - try invalidate(pathComponents: ["integer", "leading-zero-sign-2"]) - } - - @Test("[integer] leading zero sign 3", .tags(.integer)) - func integer__leading_zero_sign_3() throws { - try invalidate(pathComponents: ["integer", "leading-zero-sign-3"]) - } - @Test("[integer] negative bin", .tags(.integer)) func integer__negative_bin() throws { try invalidate(pathComponents: ["integer", "negative-bin"]) @@ -1489,6 +1254,16 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["key", "duplicate-keys-07"]) } + @Test("[key] duplicate keys 08", .tags(.key)) + func key__duplicate_keys_08() throws { + try invalidate(pathComponents: ["key", "duplicate-keys-08"]) + } + + @Test("[key] duplicate keys 09", .tags(.key)) + func key__duplicate_keys_09() throws { + try invalidate(pathComponents: ["key", "duplicate-keys-09"]) + } + @Test("[key] empty", .tags(.key)) func key__empty() throws { try invalidate(pathComponents: ["key", "empty"]) @@ -1979,26 +1754,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["string", "bad-hex-esc-05"]) } - @Test("[string] bad hex esc 1", .tags(.string)) - func string__bad_hex_esc_1() throws { - try invalidate(pathComponents: ["string", "bad-hex-esc-1"]) - } - - @Test("[string] bad hex esc 2", .tags(.string)) - func string__bad_hex_esc_2() throws { - try invalidate(pathComponents: ["string", "bad-hex-esc-2"]) - } - - @Test("[string] bad hex esc 3", .tags(.string)) - func string__bad_hex_esc_3() throws { - try invalidate(pathComponents: ["string", "bad-hex-esc-3"]) - } - - @Test("[string] bad hex esc 4", .tags(.string)) - func string__bad_hex_esc_4() throws { - try invalidate(pathComponents: ["string", "bad-hex-esc-4"]) - } - @Test("[string] bad multiline", .tags(.string)) func string__bad_multiline() throws { try invalidate(pathComponents: ["string", "bad-multiline"]) @@ -2044,74 +1799,39 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["string", "bad-uni-esc-07"]) } - @Test("[string] bad uni esc 1", .tags(.string)) - func string__bad_uni_esc_1() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-1"]) - } - - @Test("[string] bad uni esc 2", .tags(.string)) - func string__bad_uni_esc_2() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-2"]) - } - - @Test("[string] bad uni esc 3", .tags(.string)) - func string__bad_uni_esc_3() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-3"]) - } - - @Test("[string] bad uni esc 4", .tags(.string)) - func string__bad_uni_esc_4() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-4"]) - } - - @Test("[string] bad uni esc 5", .tags(.string)) - func string__bad_uni_esc_5() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-5"]) - } - - @Test("[string] bad uni esc 6", .tags(.string)) - func string__bad_uni_esc_6() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-6"]) - } - - @Test("[string] bad uni esc 7", .tags(.string)) - func string__bad_uni_esc_7() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-7"]) - } - - @Test("[string] bad uni esc ml 1", .tags(.string)) - func string__bad_uni_esc_ml_1() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-1"]) + @Test("[string] bad uni esc ml 01", .tags(.string)) + func string__bad_uni_esc_ml_01() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-01"]) } - @Test("[string] bad uni esc ml 2", .tags(.string)) - func string__bad_uni_esc_ml_2() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-2"]) + @Test("[string] bad uni esc ml 02", .tags(.string)) + func string__bad_uni_esc_ml_02() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-02"]) } - @Test("[string] bad uni esc ml 3", .tags(.string)) - func string__bad_uni_esc_ml_3() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-3"]) + @Test("[string] bad uni esc ml 03", .tags(.string)) + func string__bad_uni_esc_ml_03() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-03"]) } - @Test("[string] bad uni esc ml 4", .tags(.string)) - func string__bad_uni_esc_ml_4() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-4"]) + @Test("[string] bad uni esc ml 04", .tags(.string)) + func string__bad_uni_esc_ml_04() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-04"]) } - @Test("[string] bad uni esc ml 5", .tags(.string)) - func string__bad_uni_esc_ml_5() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-5"]) + @Test("[string] bad uni esc ml 05", .tags(.string)) + func string__bad_uni_esc_ml_05() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-05"]) } - @Test("[string] bad uni esc ml 6", .tags(.string)) - func string__bad_uni_esc_ml_6() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-6"]) + @Test("[string] bad uni esc ml 06", .tags(.string)) + func string__bad_uni_esc_ml_06() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-06"]) } - @Test("[string] bad uni esc ml 7", .tags(.string)) - func string__bad_uni_esc_ml_7() throws { - try invalidate(pathComponents: ["string", "bad-uni-esc-ml-7"]) + @Test("[string] bad uni esc ml 07", .tags(.string)) + func string__bad_uni_esc_ml_07() throws { + try invalidate(pathComponents: ["string", "bad-uni-esc-ml-07"]) } @Test("[string] basic byte escapes", .tags(.string)) diff --git a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift index a7858d47..1584d4bb 100644 --- a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift +++ b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) import Testing diff --git a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift index 4ae478c8..99138253 100644 --- a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 8be0db7469af2d97449e0a06075a1a6ecdc60231 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) import Foundation import Testing @@ -90,24 +90,24 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["array", "open-parent-table"]) } - @Test("[array] string quote comma", .tags(.array)) - func array__string_quote_comma() throws { - try verifyByFixture(pathComponents: ["array", "string-quote-comma"]) + @Test("[array] string quote comma 01", .tags(.array)) + func array__string_quote_comma_01() throws { + try verifyByFixture(pathComponents: ["array", "string-quote-comma-01"]) } - @Test("[array] string quote comma 2", .tags(.array)) - func array__string_quote_comma_2() throws { - try verifyByFixture(pathComponents: ["array", "string-quote-comma-2"]) + @Test("[array] string quote comma 02", .tags(.array)) + func array__string_quote_comma_02() throws { + try verifyByFixture(pathComponents: ["array", "string-quote-comma-02"]) } - @Test("[array] string with comma", .tags(.array)) - func array__string_with_comma() throws { - try verifyByFixture(pathComponents: ["array", "string-with-comma"]) + @Test("[array] string with comma 01", .tags(.array)) + func array__string_with_comma_01() throws { + try verifyByFixture(pathComponents: ["array", "string-with-comma-01"]) } - @Test("[array] string with comma 2", .tags(.array)) - func array__string_with_comma_2() throws { - try verifyByFixture(pathComponents: ["array", "string-with-comma-2"]) + @Test("[array] string with comma 02", .tags(.array)) + func array__string_with_comma_02() throws { + try verifyByFixture(pathComponents: ["array", "string-with-comma-02"]) } @Test("[array] strings", .tags(.array)) @@ -325,39 +325,39 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["inline-table", "inline-table"]) } - @Test("[inline-table] key dotted 1", .tags(.inline_table)) - func inline_table__key_dotted_1() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-1"]) + @Test("[inline-table] key dotted 01", .tags(.inline_table)) + func inline_table__key_dotted_01() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-01"]) } - @Test("[inline-table] key dotted 2", .tags(.inline_table)) - func inline_table__key_dotted_2() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-2"]) + @Test("[inline-table] key dotted 02", .tags(.inline_table)) + func inline_table__key_dotted_02() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-02"]) } - @Test("[inline-table] key dotted 3", .tags(.inline_table)) - func inline_table__key_dotted_3() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-3"]) + @Test("[inline-table] key dotted 03", .tags(.inline_table)) + func inline_table__key_dotted_03() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-03"]) } - @Test("[inline-table] key dotted 4", .tags(.inline_table)) - func inline_table__key_dotted_4() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-4"]) + @Test("[inline-table] key dotted 04", .tags(.inline_table)) + func inline_table__key_dotted_04() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-04"]) } - @Test("[inline-table] key dotted 5", .tags(.inline_table)) - func inline_table__key_dotted_5() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-5"]) + @Test("[inline-table] key dotted 05", .tags(.inline_table)) + func inline_table__key_dotted_05() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-05"]) } - @Test("[inline-table] key dotted 6", .tags(.inline_table)) - func inline_table__key_dotted_6() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-6"]) + @Test("[inline-table] key dotted 06", .tags(.inline_table)) + func inline_table__key_dotted_06() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-06"]) } - @Test("[inline-table] key dotted 7", .tags(.inline_table)) - func inline_table__key_dotted_7() throws { - try verifyByFixture(pathComponents: ["inline-table", "key-dotted-7"]) + @Test("[inline-table] key dotted 07", .tags(.inline_table)) + func inline_table__key_dotted_07() throws { + try verifyByFixture(pathComponents: ["inline-table", "key-dotted-07"]) } @Test("[inline-table] multiline", .tags(.inline_table)) @@ -415,24 +415,24 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["key", "case-sensitive"]) } - @Test("[key] dotted 1", .tags(.key)) - func key__dotted_1() throws { - try verifyByFixture(pathComponents: ["key", "dotted-1"]) + @Test("[key] dotted 01", .tags(.key)) + func key__dotted_01() throws { + try verifyByFixture(pathComponents: ["key", "dotted-01"]) } - @Test("[key] dotted 2", .tags(.key)) - func key__dotted_2() throws { - try verifyByFixture(pathComponents: ["key", "dotted-2"]) + @Test("[key] dotted 02", .tags(.key)) + func key__dotted_02() throws { + try verifyByFixture(pathComponents: ["key", "dotted-02"]) } - @Test("[key] dotted 3", .tags(.key)) - func key__dotted_3() throws { - try verifyByFixture(pathComponents: ["key", "dotted-3"]) + @Test("[key] dotted 03", .tags(.key)) + func key__dotted_03() throws { + try verifyByFixture(pathComponents: ["key", "dotted-03"]) } - @Test("[key] dotted 4", .tags(.key)) - func key__dotted_4() throws { - try verifyByFixture(pathComponents: ["key", "dotted-4"]) + @Test("[key] dotted 04", .tags(.key)) + func key__dotted_04() throws { + try verifyByFixture(pathComponents: ["key", "dotted-04"]) } @Test("[key] dotted empty", .tags(.key)) @@ -440,19 +440,19 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["key", "dotted-empty"]) } - @Test("[key] empty 1", .tags(.key)) - func key__empty_1() throws { - try verifyByFixture(pathComponents: ["key", "empty-1"]) + @Test("[key] empty 01", .tags(.key)) + func key__empty_01() throws { + try verifyByFixture(pathComponents: ["key", "empty-01"]) } - @Test("[key] empty 2", .tags(.key)) - func key__empty_2() throws { - try verifyByFixture(pathComponents: ["key", "empty-2"]) + @Test("[key] empty 02", .tags(.key)) + func key__empty_02() throws { + try verifyByFixture(pathComponents: ["key", "empty-02"]) } - @Test("[key] empty 3", .tags(.key)) - func key__empty_3() throws { - try verifyByFixture(pathComponents: ["key", "empty-3"]) + @Test("[key] empty 03", .tags(.key)) + func key__empty_03() throws { + try verifyByFixture(pathComponents: ["key", "empty-03"]) } @Test("[key] equals nospace", .tags(.key)) diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-01.toml index 87602c04..581710a5 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-01.toml @@ -1 +1 @@ -double-comma-1 = [1,,2] +double-comma-01 = [1,,2] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-02.toml index 8019b501..2fccf269 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-02.toml @@ -1 +1 @@ -double-comma-2 = [1,2,,] +double-comma-02 = [1,2,,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-1.toml deleted file mode 100644 index 87602c04..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-1.toml +++ /dev/null @@ -1 +0,0 @@ -double-comma-1 = [1,,2] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-2.toml deleted file mode 100644 index 8019b501..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/double-comma-2.toml +++ /dev/null @@ -1 +0,0 @@ -double-comma-2 = [1,2,,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-01.toml index fa72e49b..15160737 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-01.toml @@ -1 +1 @@ -no-close-1 = [ 1, 2, 3 +no-close-01 = [ 1, 2, 3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-02.toml index 01874ad4..d971094c 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-02.toml @@ -1 +1 @@ -no-close-2 = [1, +no-close-02 = [1, diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-03.toml index 7edcc439..c1a15db3 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-03.toml @@ -1 +1 @@ -no-close-3 = [42 #] +no-close-03 = [42 #] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-04.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-04.toml index 8c64b5e2..69976c14 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-04.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-04.toml @@ -1 +1 @@ -no-close-4 = [{ key = 42 +no-close-04 = [{ key = 42 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-05.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-05.toml index fba61097..b8cdd013 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-05.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-05.toml @@ -1 +1 @@ -no-close-5 = [{ key = 42} +no-close-05 = [{ key = 42} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-06.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-06.toml index 551e7114..48a4fec4 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-06.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-06.toml @@ -1 +1 @@ -no-close-6 = [{ key = 42 #}] +no-close-06 = [{ key = 42 #}] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-07.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-07.toml index fe8c8fdd..e7159e72 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-07.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-07.toml @@ -1 +1 @@ -no-close-7 = [{ key = 42} #] +no-close-07 = [{ key = 42} #] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-08.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-08.toml index 3378bf3d..7dcdedeb 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-08.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-08.toml @@ -1 +1 @@ -no-close-8 = [ +no-close-08 = [ diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-1.toml deleted file mode 100644 index fa72e49b..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-1.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-1 = [ 1, 2, 3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-2.toml deleted file mode 100644 index 01874ad4..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-2.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-2 = [1, diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-3.toml deleted file mode 100644 index 7edcc439..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-3.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-3 = [42 #] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-4.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-4.toml deleted file mode 100644 index 8c64b5e2..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-4.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-4 = [{ key = 42 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-5.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-5.toml deleted file mode 100644 index fba61097..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-5.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-5 = [{ key = 42} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-6.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-6.toml deleted file mode 100644 index 551e7114..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-6.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-6 = [{ key = 42 #}] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-7.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-7.toml deleted file mode 100644 index fe8c8fdd..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-7.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-7 = [{ key = 42} #] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-8.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-8.toml deleted file mode 100644 index 3378bf3d..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-close-8.toml +++ /dev/null @@ -1 +0,0 @@ -no-close-8 = [ diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-01.toml index ae7ab249..88b69fd3 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-01.toml @@ -1 +1 @@ -no-comma-1 = [true false] +no-comma-01 = [true false] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-02.toml index a8bc6071..a5e60027 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-02.toml @@ -1 +1 @@ -no-comma-2 = [ 1 2 3 ] +no-comma-02 = [ 1 2 3 ] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-03.toml index 1a636d6d..51124a50 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-03.toml @@ -1 +1 @@ -no-comma-3 = [ 1 #,] +no-comma-03 = [ 1 #,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-1.toml deleted file mode 100644 index ae7ab249..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-1.toml +++ /dev/null @@ -1 +0,0 @@ -no-comma-1 = [true false] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-2.toml deleted file mode 100644 index a8bc6071..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-2.toml +++ /dev/null @@ -1 +0,0 @@ -no-comma-2 = [ 1 2 3 ] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-3.toml deleted file mode 100644 index 1a636d6d..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/no-comma-3.toml +++ /dev/null @@ -1 +0,0 @@ -no-comma-3 = [ 1 #,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-01.toml index dca0f1b4..2d85110f 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-01.toml @@ -1 +1 @@ -only-comma-1 = [,] +only-comma-01 = [,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-02.toml index 3e46ca62..b9f7979b 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-02.toml @@ -1 +1 @@ -only-comma-2 = [,,] +only-comma-02 = [,,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-1.toml deleted file mode 100644 index dca0f1b4..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-1.toml +++ /dev/null @@ -1 +0,0 @@ -only-comma-1 = [,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-2.toml deleted file mode 100644 index 3e46ca62..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/array/only-comma-2.toml +++ /dev/null @@ -1 +0,0 @@ -only-comma-2 = [,,] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml b/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml deleted file mode 100644 index 7814ce57..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml +++ /dev/null @@ -1 +0,0 @@ -multi-cr = """null """ diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml b/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml deleted file mode 100644 index 4d4824e3..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml +++ /dev/null @@ -1 +0,0 @@ -rawmulti-cr = '''null ''' diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/datetime/offset-overflow-minute.toml b/Tests/TOMLDecoderTests/invalid_fixtures/datetime/offset-overflow-minute.toml index fdcadc52..7ab68ecf 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/datetime/offset-overflow-minute.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/datetime/offset-overflow-minute.toml @@ -1,3 +1 @@ -# Minute must be 00-59; we allow 60 too because some people do write offsets of -# 60 minutes -d = 1985-06-18 17:04:07+12:61 +d = 1985-06-18 17:04:07+12:60 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-01.toml index 2105fa9b..637d0326 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-01.toml @@ -1 +1 @@ -double-point-1 = 0..1 +double-dot-01 = 0..1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-02.toml index 1ef3d0b7..9c1b779b 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-dot-02.toml @@ -1 +1 @@ -double-point-2 = 0.1.2 +double-dot-02 = 0.1.2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-1.toml deleted file mode 100644 index 2105fa9b..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-1.toml +++ /dev/null @@ -1 +0,0 @@ -double-point-1 = 0..1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-2.toml deleted file mode 100644 index 1ef3d0b7..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/double-point-2.toml +++ /dev/null @@ -1 +0,0 @@ -double-point-2 = 0.1.2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-01.toml index 569590bb..f094e843 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-01.toml @@ -1 +1 @@ -exp-point-1 = 1e2.3 +exp-dot-01 = 1e2.3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-02.toml index 4a5e1d4d..fda50656 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-02.toml @@ -1 +1 @@ -exp-point-2 = 1.e2 +exp-dot-02 = 1.e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-03.toml index dd53e98a..89fca68b 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-dot-03.toml @@ -1 +1 @@ -exp-point-3 = 3.e+20 +exp-dot-03 = 3.e+20 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-01.toml index ee568ce8..c1e09359 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-01.toml @@ -1 +1 @@ -exp-double-e-1 = 1ee2 +exp-double-e-01 = 1ee2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-02.toml index 8fb01585..510bad54 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-02.toml @@ -1 +1 @@ -exp-double-e-2 = 1e2e3 +exp-double-e-02 = 1e2e3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-1.toml deleted file mode 100644 index ee568ce8..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-1.toml +++ /dev/null @@ -1 +0,0 @@ -exp-double-e-1 = 1ee2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-2.toml deleted file mode 100644 index 8fb01585..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-double-e-2.toml +++ /dev/null @@ -1 +0,0 @@ -exp-double-e-2 = 1e2e3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-1.toml deleted file mode 100644 index 569590bb..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-1.toml +++ /dev/null @@ -1 +0,0 @@ -exp-point-1 = 1e2.3 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-2.toml deleted file mode 100644 index 4a5e1d4d..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-2.toml +++ /dev/null @@ -1 +0,0 @@ -exp-point-2 = 1.e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-3.toml deleted file mode 100644 index dd53e98a..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-point-3.toml +++ /dev/null @@ -1 +0,0 @@ -exp-point-3 = 3.e+20 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-01.toml index b0fb70e2..23036b87 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-01.toml @@ -1 +1 @@ -exp-trailing-us-1 = 1_e2 +exp-trailing-us-01 = 1_e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-02.toml index e35f3e3f..00d19f3a 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-02.toml @@ -1 +1 @@ -exp-trailing-us-2 = 1.2_e2 +exp-trailing-us-02 = 1.2_e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-1.toml deleted file mode 100644 index b0fb70e2..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-1.toml +++ /dev/null @@ -1 +0,0 @@ -exp-trailing-us-1 = 1_e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-2.toml deleted file mode 100644 index e35f3e3f..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/exp-trailing-us-2.toml +++ /dev/null @@ -1 +0,0 @@ -exp-trailing-us-2 = 1.2_e2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-01.toml index 2c9ef598..a32d9f64 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-01.toml @@ -1 +1 @@ -inf-incomplete-1 = in +inf-incomplete-01 = in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-02.toml index afda7123..a8159ed1 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-02.toml @@ -1 +1 @@ -inf-incomplete-2 = +in +inf-incomplete-02 = +in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-03.toml index bd827386..aab9bf3a 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-03.toml @@ -1 +1 @@ -inf-incomplete-3 = -in +inf-incomplete-03 = -in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-1.toml deleted file mode 100644 index 2c9ef598..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-1.toml +++ /dev/null @@ -1 +0,0 @@ -inf-incomplete-1 = in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-2.toml deleted file mode 100644 index afda7123..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-2.toml +++ /dev/null @@ -1 +0,0 @@ -inf-incomplete-2 = +in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-3.toml deleted file mode 100644 index bd827386..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/inf-incomplete-3.toml +++ /dev/null @@ -1 +0,0 @@ -inf-incomplete-3 = -in diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-neg.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-neg.toml index 74c526fc..9b4bf4ac 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-neg.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-neg.toml @@ -1 +1 @@ -leading-point-neg = -.12345 +leading-dot-neg = -.12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-plus.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-plus.toml index 85e23a28..14eaf338 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-plus.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot-plus.toml @@ -1 +1 @@ -leading-point-plus = +.12345 +leading-dot-plus = +.12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot.toml index a3c29b97..bdf4d5fb 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-dot.toml @@ -1 +1 @@ -leading-point = .12345 +leading-dot = .12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-neg.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-neg.toml deleted file mode 100644 index 74c526fc..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-neg.toml +++ /dev/null @@ -1 +0,0 @@ -leading-point-neg = -.12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-plus.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-plus.toml deleted file mode 100644 index 85e23a28..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point-plus.toml +++ /dev/null @@ -1 +0,0 @@ -leading-point-plus = +.12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point.toml deleted file mode 100644 index a3c29b97..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/leading-point.toml +++ /dev/null @@ -1 +0,0 @@ -leading-point = .12345 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-01.toml index df2e2613..bb10c065 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-01.toml @@ -1 +1 @@ -nan-incomplete-1 = na +nan-incomplete-01 = na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-02.toml index 6d2e8fb7..3a6f5aad 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-02.toml @@ -1 +1 @@ -nan-incomplete-2 = +na +nan-incomplete-02 = +na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-03.toml index 9d365acf..1db26396 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-03.toml @@ -1 +1 @@ -nan-incomplete-3 = -na +nan-incomplete-03 = -na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-1.toml deleted file mode 100644 index df2e2613..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-1.toml +++ /dev/null @@ -1 +0,0 @@ -nan-incomplete-1 = na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-2.toml deleted file mode 100644 index 6d2e8fb7..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-2.toml +++ /dev/null @@ -1 +0,0 @@ -nan-incomplete-2 = +na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-3.toml deleted file mode 100644 index 9d365acf..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/nan-incomplete-3.toml +++ /dev/null @@ -1 +0,0 @@ -nan-incomplete-3 = -na diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-min.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-min.toml index 48741e3b..b89fcba3 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-min.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-min.toml @@ -1 +1 @@ -trailing-point-min = -1. +trailing-dot-min = -1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-plus.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-plus.toml index 99260390..c030fab9 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-plus.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot-plus.toml @@ -1 +1 @@ -trailing-point-plus = +1. +trailing-dot-plus = +1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot.toml new file mode 100644 index 00000000..109f1843 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-dot.toml @@ -0,0 +1 @@ +trailing-dot = 1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-dot.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-dot.toml new file mode 100644 index 00000000..e556976d --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-dot.toml @@ -0,0 +1 @@ +trailing-exp-dot = 0.e diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-point.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-point.toml deleted file mode 100644 index 71504d4b..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-exp-point.toml +++ /dev/null @@ -1 +0,0 @@ -trailing-exp-point = 0.e diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-min.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-min.toml deleted file mode 100644 index 48741e3b..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-min.toml +++ /dev/null @@ -1 +0,0 @@ -trailing-point-min = -1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-plus.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-plus.toml deleted file mode 100644 index 99260390..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point-plus.toml +++ /dev/null @@ -1 +0,0 @@ -trailing-point-plus = +1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point.toml deleted file mode 100644 index 76c95d91..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/trailing-point.toml +++ /dev/null @@ -1 +0,0 @@ -trailing-point = 1. diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-dot.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-dot.toml index 7f15f570..2fc5b556 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-dot.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-dot.toml @@ -1 +1 @@ -us-after-point = 1._2 +us-after-dot = 1._2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-point.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-point.toml deleted file mode 100644 index 7f15f570..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-after-point.toml +++ /dev/null @@ -1 +0,0 @@ -us-after-point = 1._2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-dot.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-dot.toml index c8edcbf0..a35eb346 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-dot.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-dot.toml @@ -1 +1 @@ -us-before-point = 1_.2 +us-before-dot = 1_.2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-point.toml b/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-point.toml deleted file mode 100644 index c8edcbf0..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/float/us-before-point.toml +++ /dev/null @@ -1 +0,0 @@ -us-before-point = 1_.2 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-01.toml index 9b6c7013..fdf40499 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-01.toml @@ -1 +1 @@ -invalid-hex-1 = 0xaafz +invalid-hex-01 = 0xaafz diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-02.toml index f0079aa0..fb3544be 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-02.toml @@ -1 +1 @@ -invalid-hex-2 = 0xgabba00f1 +invalid-hex-02 = 0xgabba00f1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-1.toml deleted file mode 100644 index 9b6c7013..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-1.toml +++ /dev/null @@ -1 +0,0 @@ -invalid-hex-1 = 0xaafz diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-2.toml deleted file mode 100644 index f0079aa0..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/invalid-hex-2.toml +++ /dev/null @@ -1 +0,0 @@ -invalid-hex-2 = 0xgabba00f1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-01.toml index eba6bda3..4256e361 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-01.toml @@ -1 +1 @@ -leading-zero-1 = 01 +leading-zero-01 = 01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-02.toml index 436af565..7f5db1ad 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-02.toml @@ -1 +1 @@ -leading-zero-2 = 00 +leading-zero-02 = 00 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-03.toml index 5404fc8a..92e7f911 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-03.toml @@ -1 +1 @@ -leading-zero-3 = 0_0 +leading-zero-03 = 0_0 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-1.toml deleted file mode 100644 index eba6bda3..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-1.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-1 = 01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-2.toml deleted file mode 100644 index 436af565..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-2.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-2 = 00 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-3.toml deleted file mode 100644 index 5404fc8a..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-3.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-3 = 0_0 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-01.toml index 1f15a9da..3d044ffe 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-01.toml @@ -1 +1 @@ -leading-zero-sign-1 = -01 +leading-zero-sign-01 = -01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-02.toml index fa259c3c..70840c7a 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-02.toml @@ -1 +1 @@ -leading-zero-sign-2 = +01 +leading-zero-sign-02 = +01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-03.toml index 3ac64a5c..2dbdf4ef 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-03.toml @@ -1 +1 @@ -leading-zero-sign-3 = +0_1 +leading-zero-sign-03 = +0_1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-1.toml deleted file mode 100644 index 1f15a9da..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-1.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-sign-1 = -01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-2.toml deleted file mode 100644 index fa259c3c..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-2.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-sign-2 = +01 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-3.toml deleted file mode 100644 index 3ac64a5c..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/integer/leading-zero-sign-3.toml +++ /dev/null @@ -1 +0,0 @@ -leading-zero-sign-3 = +0_1 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-08.toml b/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-08.toml new file mode 100644 index 00000000..bd55d6d9 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-08.toml @@ -0,0 +1,2 @@ +arr = [1] +arr = [2] diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-09.toml b/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-09.toml new file mode 100644 index 00000000..9b786897 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/key/duplicate-keys-09.toml @@ -0,0 +1,2 @@ +tbl = {k=1} +tbl = {kk=2} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-01.toml index 199c9615..0d1e7b8b 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-01.toml @@ -1 +1 @@ -bad-hex-esc-1 = "\x0g" +bad-hex-esc-01 = "\x0g" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-02.toml index 3ff07653..617a7b70 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-02.toml @@ -1 +1 @@ -bad-hex-esc-2 = "\xG0" +bad-hex-esc-02 = "\xG0" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-03.toml index 5a1df546..194d9e61 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-03.toml @@ -1 +1 @@ -bad-hex-esc-3 = "\x" +bad-hex-esc-03 = "\x" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-04.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-04.toml index 4df871b6..01fc6558 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-04.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-04.toml @@ -1 +1 @@ -bad-hex-esc-4 = "\x 50" +bad-hex-esc-04 = "\x 50" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-1.toml deleted file mode 100644 index 199c9615..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-1.toml +++ /dev/null @@ -1 +0,0 @@ -bad-hex-esc-1 = "\x0g" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-2.toml deleted file mode 100644 index 3ff07653..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-2.toml +++ /dev/null @@ -1 +0,0 @@ -bad-hex-esc-2 = "\xG0" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-3.toml deleted file mode 100644 index 5a1df546..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-3.toml +++ /dev/null @@ -1 +0,0 @@ -bad-hex-esc-3 = "\x" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-4.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-4.toml deleted file mode 100644 index 4df871b6..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-hex-esc-4.toml +++ /dev/null @@ -1 +0,0 @@ -bad-hex-esc-4 = "\x 50" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-01.toml index 36de1d1e..4892098f 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-01.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-01.toml @@ -1 +1 @@ -bad-uni-esc-1 = "val\ue" +bad-uni-esc-01 = "val\ue" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-02.toml index 0c5a6e34..cae01c50 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-02.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-02.toml @@ -1 +1 @@ -bad-uni-esc-2 = "val\Ux" +bad-uni-esc-02 = "val\Ux" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-03.toml index 1909da7a..6a8feb0f 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-03.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-03.toml @@ -1 +1 @@ -bad-uni-esc-3 = "val\U0000000" +bad-uni-esc-03 = "val\U0000000" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-04.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-04.toml index 68f0942b..3752983d 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-04.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-04.toml @@ -1 +1 @@ -bad-uni-esc-4 = "val\U0000" +bad-uni-esc-04 = "val\U0000" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-05.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-05.toml index be5322ba..90f5755e 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-05.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-05.toml @@ -1 +1 @@ -bad-uni-esc-5 = "val\Ugggggggg" +bad-uni-esc-05 = "val\Ugggggggg" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-06.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-06.toml index aa67c4b8..304b89aa 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-06.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-06.toml @@ -1 +1 @@ -bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801" +bad-uni-esc-06 = "This string contains a non scalar unicode codepoint \uD801" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-07.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-07.toml index bda89b37..072812a7 100644 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-07.toml +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-07.toml @@ -1 +1 @@ -bad-uni-esc-7 = "\uabag" +bad-uni-esc-07 = "\uabag" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-1.toml deleted file mode 100644 index 36de1d1e..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-1.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-1 = "val\ue" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-2.toml deleted file mode 100644 index 0c5a6e34..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-2.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-2 = "val\Ux" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-3.toml deleted file mode 100644 index 1909da7a..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-3.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-3 = "val\U0000000" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-4.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-4.toml deleted file mode 100644 index 68f0942b..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-4.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-4 = "val\U0000" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-5.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-5.toml deleted file mode 100644 index be5322ba..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-5.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-5 = "val\Ugggggggg" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-6.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-6.toml deleted file mode 100644 index aa67c4b8..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-6.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-7.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-7.toml deleted file mode 100644 index bda89b37..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-7.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-7 = "\uabag" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-01.toml new file mode 100644 index 00000000..23fc9998 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-01.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-01 = """val\ue""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-02.toml new file mode 100644 index 00000000..5e0cc064 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-02.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-02 = """val\Ux""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-03.toml new file mode 100644 index 00000000..62bc2f7b --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-03.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-03 = """val\U0000000""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-04.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-04.toml new file mode 100644 index 00000000..1c2ee761 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-04.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-04 = """val\U0000""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-05.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-05.toml new file mode 100644 index 00000000..76222c46 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-05.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-05 = """val\Ugggggggg""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-06.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-06.toml new file mode 100644 index 00000000..798a26d6 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-06.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-06 = """This string contains a non scalar unicode codepoint \uD801""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-07.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-07.toml new file mode 100644 index 00000000..12a84c7f --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-07.toml @@ -0,0 +1 @@ +bad-uni-esc-ml-07 = """\uabag""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-1.toml deleted file mode 100644 index 84ebd9bf..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-1.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-1 = """val\ue""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-2.toml deleted file mode 100644 index 99a1ccfb..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-2.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-2 = """val\Ux""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-3.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-3.toml deleted file mode 100644 index 46abbdb4..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-3.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-3 = """val\U0000000""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-4.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-4.toml deleted file mode 100644 index 26affcf8..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-4.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-4 = """val\U0000""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-5.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-5.toml deleted file mode 100644 index 2bbee29c..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-5.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-5 = """val\Ugggggggg""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-6.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-6.toml deleted file mode 100644 index c8f9bd02..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-6.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-6 = """This string contains a non scalar unicode codepoint \uD801""" diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-7.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-7.toml deleted file mode 100644 index 2e06ca2f..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/bad-uni-esc-ml-7.toml +++ /dev/null @@ -1 +0,0 @@ -bad-uni-esc-ml-7 = """\uabag""" diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma.json b/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-01.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma.json rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-01.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma.toml b/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-01.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma.toml rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-01.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-2.json b/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-02.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-02.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-02.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-quote-comma-02.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma.json b/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-01.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma.json rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-01.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma.toml b/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-01.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma.toml rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-01.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-2.json b/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-02.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-02.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-02.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/array/string-with-comma-02.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-1.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-01.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-01.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-01.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-01.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-2.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-02.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-02.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-02.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-02.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-3.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-03.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-03.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-03.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-03.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-4.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-04.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-4.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-04.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-4.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-04.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-4.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-04.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-5.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-05.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-5.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-05.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-5.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-05.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-5.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-05.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-6.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-06.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-6.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-06.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-6.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-06.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-6.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-06.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-7.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-07.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-7.json rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-07.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-7.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-07.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-7.toml rename to Tests/TOMLDecoderTests/valid_fixtures/inline-table/key-dotted-07.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-1.json b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-01.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-01.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-01.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-01.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-2.json b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-02.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-02.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-02.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-02.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-3.json b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-03.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-03.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-03.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-03.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-4.json b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-04.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-4.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-04.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-4.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/dotted-04.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/dotted-4.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/dotted-04.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-1.json b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-01.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-01.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-01.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-01.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-2.json b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-02.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-02.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-02.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-02.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-3.json b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-03.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-03.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/key/empty-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/key/empty-03.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/key/empty-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/key/empty-03.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json index be206e9b..526d1e17 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json @@ -1,7 +1,4 @@ { - "regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"}, - "lines": { - "type": "string", - "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n" - } + "lines": {"type": "string", "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"}, + "regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"} } From a7237b72abb6e68650c6d2766f1f565bca1a00b3 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 13:21:08 +0100 Subject: [PATCH 06/11] Bump toml-test spec version 1.0.0 -> 1.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following tests are failing now: 􀢄 Test "[inline-table] newline" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 3) Syntax error: newline not allowed in inline table. 􀢄 Test "[spec-1.1.0] common 29" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 1) Syntax error: extra chars after value. 􀢄 Test "[string] hex escape" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 Illegal escape character 'x'. 􀢄 Test "[spec-1.1.0] common 12" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 Illegal escape character 'x'. 􀢄 Test "[spec-1.1.0] common 47" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 4) Syntax error: newline not allowed in inline table. 􀢄 Test "[string] escape esc" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 Illegal escape character 'e'. 􀢄 Test "[datetime] no seconds" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 2) Syntax error: extra chars after value. 􀢄 Test "[spec-1.1.0] common 34" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 1) Syntax error: extra chars after value. 􀢄 Test "[spec-1.1.0] common 31" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 1) Syntax error: extra chars after value. 􀢄 Test "[inline-table] newline" failed after 0.014 seconds with 1 issue. 􀢄 Test "[spec-1.1.0] common 29" failed after 0.016 seconds with 1 issue. 􀢄 Test "[string] hex escape" failed after 0.017 seconds with 1 issue. 􀢄 Test "[spec-1.1.0] common 12" failed after 0.017 seconds with 1 issue. 􀢄 Test "[inline-table] newline comment" recorded an issue at TOMLComplianceSupport.swift:34:25: Issue recorded 􀄵 (Line 4) Syntax error: newline not allowed in inline table. 􀢄 Test "[spec-1.1.0] common 47" failed after 0.019 seconds with 1 issue. 􀢄 Test "[string] escape esc" failed after 0.019 seconds with 1 issue. 􀢄 Test "[datetime] no seconds" failed after 0.021 seconds with 1 issue. 􀢄 Test "[spec-1.1.0] common 34" failed after 0.025 seconds with 1 issue. 􀢄 Test "[spec-1.1.0] common 31" failed after 0.026 seconds with 1 issue. 􀢄 Test "[inline-table] newline comment" failed after 0.031 seconds with 1 issue. 􀢄 Suite TOMLValidationTests failed after 0.041 seconds with 10 issues. 􀢄 Test run with 743 tests in 8 suites failed after 0.550 seconds with 10 issues. I will fix the tests in the next couple of commits --- Scripts/generate-tests.py | 2 +- .../InvalidationTests.Generated.swift | 105 ++---- .../Support/Tags.Generated.swift | 4 +- .../ValidationTests.Generated.swift | 335 ++++++++++-------- .../invalid_fixtures/control/multi-cr.toml | 1 + .../invalid_fixtures/control/rawmulti-cr.toml | 1 + .../invalid_fixtures/datetime/no-secs.toml | 2 - .../inline-table/linebreak-01.toml | 4 - .../inline-table/linebreak-02.toml | 2 - .../inline-table/linebreak-03.toml | 2 - .../inline-table/linebreak-04.toml | 4 - .../inline-table/trailing-comma.toml | 3 - .../local-datetime/no-secs.toml | 2 - .../invalid_fixtures/local-time/no-secs.toml | 2 - .../invalid_fixtures/spec-1.0.0/keys-2.toml | 3 - .../common-16-0.toml} | 0 .../common-19-0.toml} | 0 .../common-2.toml} | 0 .../common-46-0.toml} | 0 .../common-46-1.toml} | 0 .../common-49-0.toml} | 0 .../invalid_fixtures/spec-1.1.0/common-5.toml | 4 + .../common-50-0.toml} | 0 .../string/basic-byte-escapes.toml | 1 - .../valid_fixtures/datetime/no-seconds.json | 6 + .../valid_fixtures/datetime/no-seconds.toml | 5 + .../inline-table/newline-comment.json | 23 ++ .../inline-table/newline-comment.toml | 27 ++ .../valid_fixtures/inline-table/newline.json | 31 ++ .../valid_fixtures/inline-table/newline.toml | 32 ++ .../spec-1.0.0/inline-table-0.toml | 3 - .../spec-1.0.0/inline-table-1.toml | 10 - .../valid_fixtures/spec-1.0.0/keys-4.toml | 3 - .../spec-1.0.0/local-date-time-0.json | 4 - .../spec-1.0.0/local-date-time-0.toml | 2 - .../spec-1.0.0/local-time-0.json | 4 - .../spec-1.0.0/local-time-0.toml | 2 - .../spec-1.0.0/offset-date-time-0.toml | 3 - .../valid_fixtures/spec-1.0.0/string-0.toml | 1 - .../common-0.json} | 0 .../common-0.toml} | 0 .../common-1.json} | 0 .../common-1.toml} | 0 .../keys-5.json => spec-1.1.0/common-10.json} | 0 .../keys-6.toml => spec-1.1.0/common-10.toml} | 0 .../keys-7.json => spec-1.1.0/common-11.json} | 0 .../keys-7.toml => spec-1.1.0/common-11.toml} | 0 .../common-12.json} | 0 .../valid_fixtures/spec-1.1.0/common-12.toml | 1 + .../common-13.json} | 0 .../common-13.toml} | 0 .../common-14.json} | 0 .../common-14.toml} | 0 .../common-15.json} | 0 .../common-15.toml} | 0 .../common-16.json} | 0 .../common-16.toml} | 0 .../common-17.json} | 0 .../common-17.toml} | 0 .../common-18.json} | 2 +- .../common-18.toml} | 2 +- .../common-19.json} | 0 .../common-19.toml} | 0 .../common-20.json} | 0 .../common-20.toml} | 0 .../common-21.json} | 0 .../common-21.toml} | 0 .../common-22.json} | 0 .../common-22.toml} | 0 .../common-23.json} | 0 .../common-23.toml} | 0 .../common-24.json} | 0 .../common-24.toml} | 0 .../common-25.json} | 0 .../common-25.toml} | 0 .../common-26.json} | 0 .../common-26.toml} | 0 .../common-27.json} | 3 +- .../valid_fixtures/spec-1.1.0/common-27.toml | 4 + .../common-28.json} | 0 .../common-28.toml} | 0 .../valid_fixtures/spec-1.1.0/common-29.json | 4 + .../valid_fixtures/spec-1.1.0/common-29.toml | 2 + .../keys-0.json => spec-1.1.0/common-3.json} | 0 .../keys-0.toml => spec-1.1.0/common-3.toml} | 0 .../valid_fixtures/spec-1.1.0/common-30.json | 5 + .../valid_fixtures/spec-1.1.0/common-30.toml | 3 + .../valid_fixtures/spec-1.1.0/common-31.json | 3 + .../valid_fixtures/spec-1.1.0/common-31.toml | 1 + .../common-32.json} | 0 .../common-32.toml} | 0 .../valid_fixtures/spec-1.1.0/common-33.json | 5 + .../valid_fixtures/spec-1.1.0/common-33.toml | 3 + .../valid_fixtures/spec-1.1.0/common-34.json | 3 + .../valid_fixtures/spec-1.1.0/common-34.toml | 1 + .../common-35.json} | 0 .../common-35.toml} | 0 .../common-36.json} | 0 .../common-36.toml} | 0 .../common-37.json} | 0 .../common-37.toml} | 0 .../common-38.json} | 0 .../common-38.toml} | 0 .../common-39.json} | 0 .../common-39.toml} | 0 .../keys-1.json => spec-1.1.0/common-4.json} | 0 .../keys-1.toml => spec-1.1.0/common-4.toml} | 0 .../common-40.json} | 0 .../common-40.toml} | 0 .../common-41.json} | 0 .../common-41.toml} | 0 .../common-42.json} | 0 .../common-42.toml} | 0 .../common-43.json} | 0 .../common-43.toml} | 0 .../common-44.json} | 0 .../common-44.toml} | 0 .../common-45.json} | 0 .../common-45.toml} | 0 .../common-46.json} | 0 .../common-46.toml} | 0 .../common-47.json} | 10 + .../valid_fixtures/spec-1.1.0/common-47.toml | 13 + .../common-48.json} | 10 + .../valid_fixtures/spec-1.1.0/common-48.toml | 18 + .../common-49.json} | 0 .../common-49.toml} | 0 .../common-50.json} | 0 .../common-50.toml} | 0 .../common-51.json} | 2 +- .../common-51.toml} | 6 +- .../common-52.json} | 0 .../common-52.toml} | 0 .../common-53.json} | 0 .../common-53.toml} | 0 .../keys-3.json => spec-1.1.0/common-6.json} | 0 .../keys-3.toml => spec-1.1.0/common-6.toml} | 0 .../keys-4.json => spec-1.1.0/common-7.json} | 0 .../valid_fixtures/spec-1.1.0/common-7.toml | 3 + .../valid_fixtures/spec-1.1.0/common-8.json | 8 + .../valid_fixtures/spec-1.1.0/common-8.toml | 5 + .../keys-6.json => spec-1.1.0/common-9.json} | 0 .../keys-5.toml => spec-1.1.0/common-9.toml} | 0 .../valid_fixtures/string/escape-esc.json | 3 + .../valid_fixtures/string/escape-esc.toml | 1 + .../valid_fixtures/string/hex-escape.json | 10 + .../valid_fixtures/string/hex-escape.toml | 21 ++ 147 files changed, 503 insertions(+), 282 deletions(-) create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/datetime/no-secs.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-01.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-02.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-03.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-04.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/inline-table/trailing-comma.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/local-datetime/no-secs.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/local-time/no-secs.toml delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/keys-2.toml rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/string-4-0.toml => spec-1.1.0/common-16-0.toml} (100%) rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/string-7-0.toml => spec-1.1.0/common-19-0.toml} (100%) rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/key-value-pair-1.toml => spec-1.1.0/common-2.toml} (100%) rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/table-9-0.toml => spec-1.1.0/common-46-0.toml} (100%) rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/table-9-1.toml => spec-1.1.0/common-46-1.toml} (100%) rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/inline-table-2-0.toml => spec-1.1.0/common-49-0.toml} (100%) create mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-5.toml rename Tests/TOMLDecoderTests/invalid_fixtures/{spec-1.0.0/inline-table-3-0.toml => spec-1.1.0/common-50-0.toml} (100%) delete mode 100644 Tests/TOMLDecoderTests/invalid_fixtures/string/basic-byte-escapes.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.json delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.json delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.toml delete mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/comment-0.json => spec-1.1.0/common-0.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/comment-0.toml => spec-1.1.0/common-0.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/key-value-pair-0.json => spec-1.1.0/common-1.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/key-value-pair-0.toml => spec-1.1.0/common-1.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-5.json => spec-1.1.0/common-10.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-6.toml => spec-1.1.0/common-10.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-7.json => spec-1.1.0/common-11.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-7.toml => spec-1.1.0/common-11.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-0.json => spec-1.1.0/common-12.json} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-1.json => spec-1.1.0/common-13.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-1.toml => spec-1.1.0/common-13.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-2.json => spec-1.1.0/common-14.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-2.toml => spec-1.1.0/common-14.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-3.json => spec-1.1.0/common-15.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-3.toml => spec-1.1.0/common-15.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-4.json => spec-1.1.0/common-16.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-4.toml => spec-1.1.0/common-16.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-5.json => spec-1.1.0/common-17.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-5.toml => spec-1.1.0/common-17.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-6.json => spec-1.1.0/common-18.json} (65%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-6.toml => spec-1.1.0/common-18.toml} (81%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-7.json => spec-1.1.0/common-19.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/string-7.toml => spec-1.1.0/common-19.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-0.json => spec-1.1.0/common-20.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-0.toml => spec-1.1.0/common-20.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-1.json => spec-1.1.0/common-21.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-1.toml => spec-1.1.0/common-21.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-2.json => spec-1.1.0/common-22.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/integer-2.toml => spec-1.1.0/common-22.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-0.json => spec-1.1.0/common-23.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-0.toml => spec-1.1.0/common-23.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-1.json => spec-1.1.0/common-24.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-1.toml => spec-1.1.0/common-24.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-2.json => spec-1.1.0/common-25.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/float-2.toml => spec-1.1.0/common-25.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/boolean-0.json => spec-1.1.0/common-26.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/boolean-0.toml => spec-1.1.0/common-26.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/offset-date-time-0.json => spec-1.1.0/common-27.json} (52%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/offset-date-time-1.json => spec-1.1.0/common-28.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/offset-date-time-1.toml => spec-1.1.0/common-28.toml} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-0.json => spec-1.1.0/common-3.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-0.toml => spec-1.1.0/common-3.toml} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/local-date-0.json => spec-1.1.0/common-32.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/local-date-0.toml => spec-1.1.0/common-32.toml} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-0.json => spec-1.1.0/common-35.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-0.toml => spec-1.1.0/common-35.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-1.json => spec-1.1.0/common-36.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-1.toml => spec-1.1.0/common-36.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-0.json => spec-1.1.0/common-37.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-0.toml => spec-1.1.0/common-37.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-1.json => spec-1.1.0/common-38.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-1.toml => spec-1.1.0/common-38.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-2.json => spec-1.1.0/common-39.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-2.toml => spec-1.1.0/common-39.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-1.json => spec-1.1.0/common-4.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-1.toml => spec-1.1.0/common-4.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-3.json => spec-1.1.0/common-40.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-3.toml => spec-1.1.0/common-40.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-4.json => spec-1.1.0/common-41.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-4.toml => spec-1.1.0/common-41.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-5.json => spec-1.1.0/common-42.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-5.toml => spec-1.1.0/common-42.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-6.json => spec-1.1.0/common-43.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-6.toml => spec-1.1.0/common-43.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-7.json => spec-1.1.0/common-44.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-7.toml => spec-1.1.0/common-44.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-8.json => spec-1.1.0/common-45.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-8.toml => spec-1.1.0/common-45.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-9.json => spec-1.1.0/common-46.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/table-9.toml => spec-1.1.0/common-46.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-0.json => spec-1.1.0/common-47.json} (50%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-1.json => spec-1.1.0/common-48.json} (50%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-2.json => spec-1.1.0/common-49.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-2.toml => spec-1.1.0/common-49.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-3.json => spec-1.1.0/common-50.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/inline-table-3.toml => spec-1.1.0/common-50.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-0.json => spec-1.1.0/common-51.json} (95%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-0.toml => spec-1.1.0/common-51.toml} (52%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-1.json => spec-1.1.0/common-52.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-1.toml => spec-1.1.0/common-52.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-2.json => spec-1.1.0/common-53.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/array-of-tables-2.toml => spec-1.1.0/common-53.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-3.json => spec-1.1.0/common-6.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-3.toml => spec-1.1.0/common-6.toml} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-4.json => spec-1.1.0/common-7.json} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.toml rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-6.json => spec-1.1.0/common-9.json} (100%) rename Tests/TOMLDecoderTests/valid_fixtures/{spec-1.0.0/keys-5.toml => spec-1.1.0/common-9.toml} (100%) create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.toml create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.json create mode 100644 Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.toml diff --git a/Scripts/generate-tests.py b/Scripts/generate-tests.py index 8667b955..6f526917 100755 --- a/Scripts/generate-tests.py +++ b/Scripts/generate-tests.py @@ -17,7 +17,7 @@ REPO_ROOT = Path(__file__).resolve().parent.parent -DEFAULT_SPEC_VERSION = "1.0.0" +DEFAULT_SPEC_VERSION = "1.1.0" TMP_ROOT = REPO_ROOT / "tmp" TOML_TEST_REPO_URL = "git@github.com:toml-lang/toml-test.git" TOML_TEST_COMMIT = "0ee318ae97ae5dec5f74aeccafbdc75f435580e2" diff --git a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift index 7e7913eb..2705b370 100644 --- a/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/InvalidationTests.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.1.0) import Foundation import Testing @@ -274,6 +274,11 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["control", "comment-us"]) } + @Test("[control] multi cr", .tags(.control)) + func control__multi_cr() throws { + try invalidate(pathComponents: ["control", "multi-cr"]) + } + @Test("[control] multi del", .tags(.control)) func control__multi_del() throws { try invalidate(pathComponents: ["control", "multi-del"]) @@ -309,6 +314,11 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["control", "only-vt"]) } + @Test("[control] rawmulti cr", .tags(.control)) + func control__rawmulti_cr() throws { + try invalidate(pathComponents: ["control", "rawmulti-cr"]) + } + @Test("[control] rawmulti del", .tags(.control)) func control__rawmulti_del() throws { try invalidate(pathComponents: ["control", "rawmulti-del"]) @@ -449,11 +459,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["datetime", "no-leads-with-milli"]) } - @Test("[datetime] no secs", .tags(.datetime)) - func datetime__no_secs() throws { - try invalidate(pathComponents: ["datetime", "no-secs"]) - } - @Test("[datetime] no t", .tags(.datetime)) func datetime__no_t() throws { try invalidate(pathComponents: ["datetime", "no-t"]) @@ -889,26 +894,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["inline-table", "empty-03"]) } - @Test("[inline-table] linebreak 01", .tags(.inline_table)) - func inline_table__linebreak_01() throws { - try invalidate(pathComponents: ["inline-table", "linebreak-01"]) - } - - @Test("[inline-table] linebreak 02", .tags(.inline_table)) - func inline_table__linebreak_02() throws { - try invalidate(pathComponents: ["inline-table", "linebreak-02"]) - } - - @Test("[inline-table] linebreak 03", .tags(.inline_table)) - func inline_table__linebreak_03() throws { - try invalidate(pathComponents: ["inline-table", "linebreak-03"]) - } - - @Test("[inline-table] linebreak 04", .tags(.inline_table)) - func inline_table__linebreak_04() throws { - try invalidate(pathComponents: ["inline-table", "linebreak-04"]) - } - @Test("[inline-table] no close 01", .tags(.inline_table)) func inline_table__no_close_01() throws { try invalidate(pathComponents: ["inline-table", "no-close-01"]) @@ -979,11 +964,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["inline-table", "overwrite-10"]) } - @Test("[inline-table] trailing comma", .tags(.inline_table)) - func inline_table__trailing_comma() throws { - try invalidate(pathComponents: ["inline-table", "trailing-comma"]) - } - @Test("[integer] capital bin", .tags(.integer)) func integer__capital_bin() throws { try invalidate(pathComponents: ["integer", "capital-bin"]) @@ -1589,11 +1569,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["local-datetime", "no-leads-with-milli"]) } - @Test("[local-datetime] no secs", .tags(.local_datetime)) - func local_datetime__no_secs() throws { - try invalidate(pathComponents: ["local-datetime", "no-secs"]) - } - @Test("[local-datetime] no t", .tags(.local_datetime)) func local_datetime__no_t() throws { try invalidate(pathComponents: ["local-datetime", "no-t"]) @@ -1624,11 +1599,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["local-time", "minute-over"]) } - @Test("[local-time] no secs", .tags(.local_time)) - func local_time__no_secs() throws { - try invalidate(pathComponents: ["local-time", "no-secs"]) - } - @Test("[local-time] second over", .tags(.local_time)) func local_time__second_over() throws { try invalidate(pathComponents: ["local-time", "second-over"]) @@ -1654,44 +1624,44 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["local-time", "trailing-dotdot"]) } - @Test("[spec-1.0.0] inline table 2 0", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_2_0() throws { - try invalidate(pathComponents: ["spec-1.0.0", "inline-table-2-0"]) + @Test("[spec-1.1.0] common 16 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_16_0() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-16-0"]) } - @Test("[spec-1.0.0] inline table 3 0", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_3_0() throws { - try invalidate(pathComponents: ["spec-1.0.0", "inline-table-3-0"]) + @Test("[spec-1.1.0] common 19 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_19_0() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-19-0"]) } - @Test("[spec-1.0.0] key value pair 1", .tags(.spec_1_0_0)) - func spec_1_0_0__key_value_pair_1() throws { - try invalidate(pathComponents: ["spec-1.0.0", "key-value-pair-1"]) + @Test("[spec-1.1.0] common 2", .tags(.spec_1_1_0)) + func spec_1_1_0__common_2() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-2"]) } - @Test("[spec-1.0.0] keys 2", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_2() throws { - try invalidate(pathComponents: ["spec-1.0.0", "keys-2"]) + @Test("[spec-1.1.0] common 46 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_46_0() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-46-0"]) } - @Test("[spec-1.0.0] string 4 0", .tags(.spec_1_0_0)) - func spec_1_0_0__string_4_0() throws { - try invalidate(pathComponents: ["spec-1.0.0", "string-4-0"]) + @Test("[spec-1.1.0] common 46 1", .tags(.spec_1_1_0)) + func spec_1_1_0__common_46_1() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-46-1"]) } - @Test("[spec-1.0.0] string 7 0", .tags(.spec_1_0_0)) - func spec_1_0_0__string_7_0() throws { - try invalidate(pathComponents: ["spec-1.0.0", "string-7-0"]) + @Test("[spec-1.1.0] common 49 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_49_0() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-49-0"]) } - @Test("[spec-1.0.0] table 9 0", .tags(.spec_1_0_0)) - func spec_1_0_0__table_9_0() throws { - try invalidate(pathComponents: ["spec-1.0.0", "table-9-0"]) + @Test("[spec-1.1.0] common 5", .tags(.spec_1_1_0)) + func spec_1_1_0__common_5() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-5"]) } - @Test("[spec-1.0.0] table 9 1", .tags(.spec_1_0_0)) - func spec_1_0_0__table_9_1() throws { - try invalidate(pathComponents: ["spec-1.0.0", "table-9-1"]) + @Test("[spec-1.1.0] common 50 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_50_0() throws { + try invalidate(pathComponents: ["spec-1.1.0", "common-50-0"]) } @Test("[string] bad byte escape", .tags(.string)) @@ -1834,11 +1804,6 @@ struct TOMLInvalidationTests { try invalidate(pathComponents: ["string", "bad-uni-esc-ml-07"]) } - @Test("[string] basic byte escapes", .tags(.string)) - func string__basic_byte_escapes() throws { - try invalidate(pathComponents: ["string", "basic-byte-escapes"]) - } - @Test("[string] basic multiline out of range unicode escape 01", .tags(.string)) func string__basic_multiline_out_of_range_unicode_escape_01() throws { try invalidate(pathComponents: ["string", "basic-multiline-out-of-range-unicode-escape-01"]) diff --git a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift index 1584d4bb..6aeaa514 100644 --- a/Tests/TOMLDecoderTests/Support/Tags.Generated.swift +++ b/Tests/TOMLDecoderTests/Support/Tags.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.1.0) import Testing @@ -17,7 +17,7 @@ extension Tag { @Tag static var local_date: Self @Tag static var local_datetime: Self @Tag static var local_time: Self - @Tag static var spec_1_0_0: Self + @Tag static var spec_1_1_0: Self @Tag static var string: Self @Tag static var table: Self } diff --git a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift index 99138253..6f516b08 100644 --- a/Tests/TOMLDecoderTests/ValidationTests.Generated.swift +++ b/Tests/TOMLDecoderTests/ValidationTests.Generated.swift @@ -1,5 +1,5 @@ // Generated by Scripts/generate-tests.py -// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.0.0) +// Source: toml-test commit 0ee318ae97ae5dec5f74aeccafbdc75f435580e2 (spec 1.1.0) import Foundation import Testing @@ -205,6 +205,11 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["datetime", "milliseconds"]) } + @Test("[datetime] no seconds", .tags(.datetime)) + func datetime__no_seconds() throws { + try verifyByFixture(pathComponents: ["datetime", "no-seconds"]) + } + @Test("[datetime] timezone", .tags(.datetime)) func datetime__timezone() throws { try verifyByFixture(pathComponents: ["datetime", "timezone"]) @@ -370,6 +375,16 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["inline-table", "nest"]) } + @Test("[inline-table] newline", .tags(.inline_table)) + func inline_table__newline() throws { + try verifyByFixture(pathComponents: ["inline-table", "newline"]) + } + + @Test("[inline-table] newline comment", .tags(.inline_table)) + func inline_table__newline_comment() throws { + try verifyByFixture(pathComponents: ["inline-table", "newline-comment"]) + } + @Test("[inline-table] spaces", .tags(.inline_table)) func inline_table__spaces() throws { try verifyByFixture(pathComponents: ["inline-table", "spaces"]) @@ -560,244 +575,264 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["newline-lf"]) } - @Test("[spec-1.0.0] array 0", .tags(.spec_1_0_0)) - func spec_1_0_0__array_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "array-0"]) + @Test("[spec-1.1.0] common 0", .tags(.spec_1_1_0)) + func spec_1_1_0__common_0() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-0"]) + } + + @Test("[spec-1.1.0] common 1", .tags(.spec_1_1_0)) + func spec_1_1_0__common_1() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-1"]) + } + + @Test("[spec-1.1.0] common 10", .tags(.spec_1_1_0)) + func spec_1_1_0__common_10() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-10"]) + } + + @Test("[spec-1.1.0] common 11", .tags(.spec_1_1_0)) + func spec_1_1_0__common_11() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-11"]) + } + + @Test("[spec-1.1.0] common 12", .tags(.spec_1_1_0)) + func spec_1_1_0__common_12() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-12"]) } - @Test("[spec-1.0.0] array 1", .tags(.spec_1_0_0)) - func spec_1_0_0__array_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "array-1"]) + @Test("[spec-1.1.0] common 13", .tags(.spec_1_1_0)) + func spec_1_1_0__common_13() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-13"]) } - @Test("[spec-1.0.0] array of tables 0", .tags(.spec_1_0_0)) - func spec_1_0_0__array_of_tables_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "array-of-tables-0"]) + @Test("[spec-1.1.0] common 14", .tags(.spec_1_1_0)) + func spec_1_1_0__common_14() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-14"]) } - @Test("[spec-1.0.0] array of tables 1", .tags(.spec_1_0_0)) - func spec_1_0_0__array_of_tables_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "array-of-tables-1"]) + @Test("[spec-1.1.0] common 15", .tags(.spec_1_1_0)) + func spec_1_1_0__common_15() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-15"]) } - @Test("[spec-1.0.0] array of tables 2", .tags(.spec_1_0_0)) - func spec_1_0_0__array_of_tables_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "array-of-tables-2"]) + @Test("[spec-1.1.0] common 16", .tags(.spec_1_1_0)) + func spec_1_1_0__common_16() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-16"]) } - @Test("[spec-1.0.0] boolean 0", .tags(.spec_1_0_0)) - func spec_1_0_0__boolean_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "boolean-0"]) + @Test("[spec-1.1.0] common 17", .tags(.spec_1_1_0)) + func spec_1_1_0__common_17() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-17"]) } - @Test("[spec-1.0.0] comment 0", .tags(.spec_1_0_0)) - func spec_1_0_0__comment_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "comment-0"]) + @Test("[spec-1.1.0] common 18", .tags(.spec_1_1_0)) + func spec_1_1_0__common_18() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-18"]) } - @Test("[spec-1.0.0] float 0", .tags(.spec_1_0_0)) - func spec_1_0_0__float_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "float-0"]) + @Test("[spec-1.1.0] common 19", .tags(.spec_1_1_0)) + func spec_1_1_0__common_19() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-19"]) } - @Test("[spec-1.0.0] float 1", .tags(.spec_1_0_0)) - func spec_1_0_0__float_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "float-1"]) + @Test("[spec-1.1.0] common 20", .tags(.spec_1_1_0)) + func spec_1_1_0__common_20() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-20"]) } - @Test("[spec-1.0.0] float 2", .tags(.spec_1_0_0)) - func spec_1_0_0__float_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "float-2"]) + @Test("[spec-1.1.0] common 21", .tags(.spec_1_1_0)) + func spec_1_1_0__common_21() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-21"]) } - @Test("[spec-1.0.0] inline table 0", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "inline-table-0"]) + @Test("[spec-1.1.0] common 22", .tags(.spec_1_1_0)) + func spec_1_1_0__common_22() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-22"]) } - @Test("[spec-1.0.0] inline table 1", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "inline-table-1"]) + @Test("[spec-1.1.0] common 23", .tags(.spec_1_1_0)) + func spec_1_1_0__common_23() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-23"]) } - @Test("[spec-1.0.0] inline table 2", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "inline-table-2"]) + @Test("[spec-1.1.0] common 24", .tags(.spec_1_1_0)) + func spec_1_1_0__common_24() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-24"]) } - @Test("[spec-1.0.0] inline table 3", .tags(.spec_1_0_0)) - func spec_1_0_0__inline_table_3() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "inline-table-3"]) + @Test("[spec-1.1.0] common 25", .tags(.spec_1_1_0)) + func spec_1_1_0__common_25() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-25"]) } - @Test("[spec-1.0.0] integer 0", .tags(.spec_1_0_0)) - func spec_1_0_0__integer_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "integer-0"]) + @Test("[spec-1.1.0] common 26", .tags(.spec_1_1_0)) + func spec_1_1_0__common_26() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-26"]) } - @Test("[spec-1.0.0] integer 1", .tags(.spec_1_0_0)) - func spec_1_0_0__integer_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "integer-1"]) + @Test("[spec-1.1.0] common 27", .tags(.spec_1_1_0)) + func spec_1_1_0__common_27() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-27"]) } - @Test("[spec-1.0.0] integer 2", .tags(.spec_1_0_0)) - func spec_1_0_0__integer_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "integer-2"]) + @Test("[spec-1.1.0] common 28", .tags(.spec_1_1_0)) + func spec_1_1_0__common_28() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-28"]) } - @Test("[spec-1.0.0] key value pair 0", .tags(.spec_1_0_0)) - func spec_1_0_0__key_value_pair_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "key-value-pair-0"]) + @Test("[spec-1.1.0] common 29", .tags(.spec_1_1_0)) + func spec_1_1_0__common_29() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-29"]) } - @Test("[spec-1.0.0] keys 0", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-0"]) + @Test("[spec-1.1.0] common 3", .tags(.spec_1_1_0)) + func spec_1_1_0__common_3() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-3"]) } - @Test("[spec-1.0.0] keys 1", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-1"]) + @Test("[spec-1.1.0] common 30", .tags(.spec_1_1_0)) + func spec_1_1_0__common_30() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-30"]) } - @Test("[spec-1.0.0] keys 3", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_3() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-3"]) + @Test("[spec-1.1.0] common 31", .tags(.spec_1_1_0)) + func spec_1_1_0__common_31() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-31"]) } - @Test("[spec-1.0.0] keys 4", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_4() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-4"]) + @Test("[spec-1.1.0] common 32", .tags(.spec_1_1_0)) + func spec_1_1_0__common_32() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-32"]) } - @Test("[spec-1.0.0] keys 5", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_5() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-5"]) + @Test("[spec-1.1.0] common 33", .tags(.spec_1_1_0)) + func spec_1_1_0__common_33() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-33"]) } - @Test("[spec-1.0.0] keys 6", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_6() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-6"]) + @Test("[spec-1.1.0] common 34", .tags(.spec_1_1_0)) + func spec_1_1_0__common_34() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-34"]) } - @Test("[spec-1.0.0] keys 7", .tags(.spec_1_0_0)) - func spec_1_0_0__keys_7() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "keys-7"]) + @Test("[spec-1.1.0] common 35", .tags(.spec_1_1_0)) + func spec_1_1_0__common_35() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-35"]) } - @Test("[spec-1.0.0] local date 0", .tags(.spec_1_0_0)) - func spec_1_0_0__local_date_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "local-date-0"]) + @Test("[spec-1.1.0] common 36", .tags(.spec_1_1_0)) + func spec_1_1_0__common_36() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-36"]) } - @Test("[spec-1.0.0] local date time 0", .tags(.spec_1_0_0)) - func spec_1_0_0__local_date_time_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "local-date-time-0"]) + @Test("[spec-1.1.0] common 37", .tags(.spec_1_1_0)) + func spec_1_1_0__common_37() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-37"]) } - @Test("[spec-1.0.0] local time 0", .tags(.spec_1_0_0)) - func spec_1_0_0__local_time_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "local-time-0"]) + @Test("[spec-1.1.0] common 38", .tags(.spec_1_1_0)) + func spec_1_1_0__common_38() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-38"]) } - @Test("[spec-1.0.0] offset date time 0", .tags(.spec_1_0_0)) - func spec_1_0_0__offset_date_time_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "offset-date-time-0"]) + @Test("[spec-1.1.0] common 39", .tags(.spec_1_1_0)) + func spec_1_1_0__common_39() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-39"]) } - @Test("[spec-1.0.0] offset date time 1", .tags(.spec_1_0_0)) - func spec_1_0_0__offset_date_time_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "offset-date-time-1"]) + @Test("[spec-1.1.0] common 4", .tags(.spec_1_1_0)) + func spec_1_1_0__common_4() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-4"]) } - @Test("[spec-1.0.0] string 0", .tags(.spec_1_0_0)) - func spec_1_0_0__string_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-0"]) + @Test("[spec-1.1.0] common 40", .tags(.spec_1_1_0)) + func spec_1_1_0__common_40() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-40"]) } - @Test("[spec-1.0.0] string 1", .tags(.spec_1_0_0)) - func spec_1_0_0__string_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-1"]) + @Test("[spec-1.1.0] common 41", .tags(.spec_1_1_0)) + func spec_1_1_0__common_41() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-41"]) } - @Test("[spec-1.0.0] string 2", .tags(.spec_1_0_0)) - func spec_1_0_0__string_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-2"]) + @Test("[spec-1.1.0] common 42", .tags(.spec_1_1_0)) + func spec_1_1_0__common_42() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-42"]) } - @Test("[spec-1.0.0] string 3", .tags(.spec_1_0_0)) - func spec_1_0_0__string_3() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-3"]) + @Test("[spec-1.1.0] common 43", .tags(.spec_1_1_0)) + func spec_1_1_0__common_43() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-43"]) } - @Test("[spec-1.0.0] string 4", .tags(.spec_1_0_0)) - func spec_1_0_0__string_4() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-4"]) + @Test("[spec-1.1.0] common 44", .tags(.spec_1_1_0)) + func spec_1_1_0__common_44() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-44"]) } - @Test("[spec-1.0.0] string 5", .tags(.spec_1_0_0)) - func spec_1_0_0__string_5() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-5"]) + @Test("[spec-1.1.0] common 45", .tags(.spec_1_1_0)) + func spec_1_1_0__common_45() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-45"]) } - @Test("[spec-1.0.0] string 6", .tags(.spec_1_0_0)) - func spec_1_0_0__string_6() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-6"]) + @Test("[spec-1.1.0] common 46", .tags(.spec_1_1_0)) + func spec_1_1_0__common_46() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-46"]) } - @Test("[spec-1.0.0] string 7", .tags(.spec_1_0_0)) - func spec_1_0_0__string_7() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "string-7"]) + @Test("[spec-1.1.0] common 47", .tags(.spec_1_1_0)) + func spec_1_1_0__common_47() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-47"]) } - @Test("[spec-1.0.0] table 0", .tags(.spec_1_0_0)) - func spec_1_0_0__table_0() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-0"]) + @Test("[spec-1.1.0] common 48", .tags(.spec_1_1_0)) + func spec_1_1_0__common_48() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-48"]) } - @Test("[spec-1.0.0] table 1", .tags(.spec_1_0_0)) - func spec_1_0_0__table_1() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-1"]) + @Test("[spec-1.1.0] common 49", .tags(.spec_1_1_0)) + func spec_1_1_0__common_49() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-49"]) } - @Test("[spec-1.0.0] table 2", .tags(.spec_1_0_0)) - func spec_1_0_0__table_2() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-2"]) + @Test("[spec-1.1.0] common 50", .tags(.spec_1_1_0)) + func spec_1_1_0__common_50() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-50"]) } - @Test("[spec-1.0.0] table 3", .tags(.spec_1_0_0)) - func spec_1_0_0__table_3() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-3"]) + @Test("[spec-1.1.0] common 51", .tags(.spec_1_1_0)) + func spec_1_1_0__common_51() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-51"]) } - @Test("[spec-1.0.0] table 4", .tags(.spec_1_0_0)) - func spec_1_0_0__table_4() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-4"]) + @Test("[spec-1.1.0] common 52", .tags(.spec_1_1_0)) + func spec_1_1_0__common_52() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-52"]) } - @Test("[spec-1.0.0] table 5", .tags(.spec_1_0_0)) - func spec_1_0_0__table_5() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-5"]) + @Test("[spec-1.1.0] common 53", .tags(.spec_1_1_0)) + func spec_1_1_0__common_53() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-53"]) } - @Test("[spec-1.0.0] table 6", .tags(.spec_1_0_0)) - func spec_1_0_0__table_6() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-6"]) + @Test("[spec-1.1.0] common 6", .tags(.spec_1_1_0)) + func spec_1_1_0__common_6() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-6"]) } - @Test("[spec-1.0.0] table 7", .tags(.spec_1_0_0)) - func spec_1_0_0__table_7() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-7"]) + @Test("[spec-1.1.0] common 7", .tags(.spec_1_1_0)) + func spec_1_1_0__common_7() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-7"]) } - @Test("[spec-1.0.0] table 8", .tags(.spec_1_0_0)) - func spec_1_0_0__table_8() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-8"]) + @Test("[spec-1.1.0] common 8", .tags(.spec_1_1_0)) + func spec_1_1_0__common_8() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-8"]) } - @Test("[spec-1.0.0] table 9", .tags(.spec_1_0_0)) - func spec_1_0_0__table_9() throws { - try verifyByFixture(pathComponents: ["spec-1.0.0", "table-9"]) + @Test("[spec-1.1.0] common 9", .tags(.spec_1_1_0)) + func spec_1_1_0__common_9() throws { + try verifyByFixture(pathComponents: ["spec-1.1.0", "common-9"]) } @Test("spec example 1") @@ -835,6 +870,11 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["string", "ends-in-whitespace-escape"]) } + @Test("[string] escape esc", .tags(.string)) + func string__escape_esc() throws { + try verifyByFixture(pathComponents: ["string", "escape-esc"]) + } + @Test("[string] escape tricky", .tags(.string)) func string__escape_tricky() throws { try verifyByFixture(pathComponents: ["string", "escape-tricky"]) @@ -850,6 +890,11 @@ struct TOMLValidationTests { try verifyByFixture(pathComponents: ["string", "escapes"]) } + @Test("[string] hex escape", .tags(.string)) + func string__hex_escape() throws { + try verifyByFixture(pathComponents: ["string", "hex-escape"]) + } + @Test("[string] multibyte", .tags(.string)) func string__multibyte() throws { try verifyByFixture(pathComponents: ["string", "multibyte"]) diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml b/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml new file mode 100644 index 00000000..7814ce57 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/control/multi-cr.toml @@ -0,0 +1 @@ +multi-cr = """null """ diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml b/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml new file mode 100644 index 00000000..4d4824e3 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/control/rawmulti-cr.toml @@ -0,0 +1 @@ +rawmulti-cr = '''null ''' diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/datetime/no-secs.toml b/Tests/TOMLDecoderTests/invalid_fixtures/datetime/no-secs.toml deleted file mode 100644 index bbd196af..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/datetime/no-secs.toml +++ /dev/null @@ -1,2 +0,0 @@ -# No seconds in time. -no-secs = 1987-07-05T17:45Z diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-01.toml b/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-01.toml deleted file mode 100644 index 0ae44b63..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-01.toml +++ /dev/null @@ -1,4 +0,0 @@ -# No newlines are allowed between the curly braces unless they are valid within -# a value. -simple = { a = 1 -} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-02.toml b/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-02.toml deleted file mode 100644 index 5ea4eaf5..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-02.toml +++ /dev/null @@ -1,2 +0,0 @@ -t = {a=1, -b=2} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-03.toml b/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-03.toml deleted file mode 100644 index 7f6e8924..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-03.toml +++ /dev/null @@ -1,2 +0,0 @@ -t = {a=1 -,b=2} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-04.toml b/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-04.toml deleted file mode 100644 index 3f34e15c..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/linebreak-04.toml +++ /dev/null @@ -1,4 +0,0 @@ -json_like = { - first = "Tom", - last = "Preston-Werner" -} diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/trailing-comma.toml b/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/trailing-comma.toml deleted file mode 100644 index 6b67e020..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/inline-table/trailing-comma.toml +++ /dev/null @@ -1,3 +0,0 @@ -# A terminating comma (also called trailing comma) is not permitted after the -# last key/value pair in an inline table -abc = { abc = 123, } diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/local-datetime/no-secs.toml b/Tests/TOMLDecoderTests/invalid_fixtures/local-datetime/no-secs.toml deleted file mode 100644 index e4dc1dfc..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/local-datetime/no-secs.toml +++ /dev/null @@ -1,2 +0,0 @@ -# No seconds in time. -no-secs = 1987-07-05T17:45 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/local-time/no-secs.toml b/Tests/TOMLDecoderTests/invalid_fixtures/local-time/no-secs.toml deleted file mode 100644 index 1fe65f6a..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/local-time/no-secs.toml +++ /dev/null @@ -1,2 +0,0 @@ -# No seconds in time. -no-secs = 17:45 diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/keys-2.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/keys-2.toml deleted file mode 100644 index 1547a5c7..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/keys-2.toml +++ /dev/null @@ -1,3 +0,0 @@ -= "no key name" # INVALID -"" = "blank" # VALID but discouraged -'' = 'blank' # VALID but discouraged diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/string-4-0.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-16-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/string-4-0.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-16-0.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/string-7-0.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-19-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/string-7-0.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-19-0.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/key-value-pair-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-2.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/key-value-pair-1.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-2.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/table-9-0.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-46-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/table-9-0.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-46-0.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/table-9-1.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-46-1.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/table-9-1.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-46-1.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/inline-table-2-0.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-49-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/inline-table-2-0.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-49-0.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-5.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-5.toml new file mode 100644 index 00000000..e513e3b8 --- /dev/null +++ b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-5.toml @@ -0,0 +1,4 @@ += "no key name" # INVALID +"""key""" = "not allowed" # INVALID +"" = "blank" # VALID but discouraged +'' = 'blank' # VALID but discouraged diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/inline-table-3-0.toml b/Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-50-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/invalid_fixtures/spec-1.0.0/inline-table-3-0.toml rename to Tests/TOMLDecoderTests/invalid_fixtures/spec-1.1.0/common-50-0.toml diff --git a/Tests/TOMLDecoderTests/invalid_fixtures/string/basic-byte-escapes.toml b/Tests/TOMLDecoderTests/invalid_fixtures/string/basic-byte-escapes.toml deleted file mode 100644 index e94452a8..00000000 --- a/Tests/TOMLDecoderTests/invalid_fixtures/string/basic-byte-escapes.toml +++ /dev/null @@ -1 +0,0 @@ -answer = "\x33" diff --git a/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.json b/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.json new file mode 100644 index 00000000..bb7b6506 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.json @@ -0,0 +1,6 @@ +{ + "without-seconds-1": {"type": "time-local", "value": "13:37:00"}, + "without-seconds-2": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}, + "without-seconds-3": {"type": "datetime", "value": "1979-05-27T07:32:00-07:00"}, + "without-seconds-4": {"type": "datetime-local", "value": "1979-05-27T07:32:00"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.toml b/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.toml new file mode 100644 index 00000000..a0fd2600 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/datetime/no-seconds.toml @@ -0,0 +1,5 @@ +# Seconds are optional in date-time and time. +without-seconds-1 = 13:37 +without-seconds-2 = 1979-05-27 07:32Z +without-seconds-3 = 1979-05-27 07:32-07:00 +without-seconds-4 = 1979-05-27T07:32 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.json new file mode 100644 index 00000000..40e2d45c --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.json @@ -0,0 +1,23 @@ +{ + "tbl-1": { + "1": {"type": "integer", "value": "2"}, + "hello": {"type": "string", "value": "world"}, + "arr": [ + {"type": "integer", "value": "1"}, + {"type": "integer", "value": "2"}, + {"type": "integer", "value": "3"} + ], + "tbl": { + "k": {"type": "integer", "value": "1"} + } + }, + "tbl-2": { + "k": {"type": "string", "value": "\tHello\n\t"} + }, + "trailing-comma-1": { + "c": {"type": "integer", "value": "1"} + }, + "trailing-comma-2": { + "c": {"type": "integer", "value": "1"} + } +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.toml new file mode 100644 index 00000000..f558d807 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline-comment.toml @@ -0,0 +1,27 @@ +# Identical to newline.toml, but with comments that shouldn't affect the +# results. + +trailing-comma-1 = {#comment + # comment + c = 1,#comment + #comment +}#comment +trailing-comma-2 = { c = 1, }#comment + +tbl-1 = {#comment + hello = "world",#comment + 1 = 2,#comment + arr = [1,#comment + 2,#comment + 3,#comment + ],#comment + tbl = {#comment + k = 1,#comment + }#comment +}#comment + +tbl-2 = {#comment + k = """ + Hello + """#comment +}#comment diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.json b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.json new file mode 100644 index 00000000..3277caa9 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.json @@ -0,0 +1,31 @@ +{ + "no-newline-before-brace": { + "a": {"type": "integer", "value": "1"}, + "b": {"type": "integer", "value": "2"} + }, + "no-newline-before-brace-with-comma": { + "a": {"type": "integer", "value": "1"}, + "b": {"type": "integer", "value": "2"} + }, + "tbl-1": { + "1": {"type": "integer", "value": "2"}, + "hello": {"type": "string", "value": "world"}, + "arr": [ + {"type": "integer", "value": "1"}, + {"type": "integer", "value": "2"}, + {"type": "integer", "value": "3"} + ], + "tbl": { + "k": {"type": "integer", "value": "1"} + } + }, + "tbl-2": { + "k": {"type": "string", "value": "\tHello\n\t"} + }, + "trailing-comma-1": { + "c": {"type": "integer", "value": "1"} + }, + "trailing-comma-2": { + "c": {"type": "integer", "value": "1"} + } +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.toml b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.toml new file mode 100644 index 00000000..6dbc9a48 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/inline-table/newline.toml @@ -0,0 +1,32 @@ +# TOML 1.1 supports newlines in inline tables and trailing commas. + +trailing-comma-1 = { + c = 1, +} +trailing-comma-2 = { c = 1, } + +tbl-1 = { + hello = "world", + 1 = 2, + arr = [1, + 2, + 3, + ], + tbl = { + k = 1, + } +} + +tbl-2 = { + k = """ + Hello + """ +} + +no-newline-before-brace = { +a = 1, +b = 2} + +no-newline-before-brace-with-comma = { +a = 1, +b = 2,} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.toml deleted file mode 100644 index 26062b51..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.toml +++ /dev/null @@ -1,3 +0,0 @@ -name = { first = "Tom", last = "Preston-Werner" } -point = { x = 1, y = 2 } -animal = { type.name = "pug" } diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.toml deleted file mode 100644 index 6f72155f..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.toml +++ /dev/null @@ -1,10 +0,0 @@ -[name] -first = "Tom" -last = "Preston-Werner" - -[point] -x = 1 -y = 2 - -[animal] -type.name = "pug" diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.toml deleted file mode 100644 index 75bf90b5..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.toml +++ /dev/null @@ -1,3 +0,0 @@ -fruit.name = "banana" # this is best practice -fruit. color = "yellow" # same as fruit.color -fruit . flavor = "banana" # same as fruit.flavor diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.json deleted file mode 100644 index b2c7bb5b..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "ldt1": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}, - "ldt2": {"type": "datetime-local", "value": "1979-05-27T00:32:00.999"} -} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.toml deleted file mode 100644 index 13f375b0..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-time-0.toml +++ /dev/null @@ -1,2 +0,0 @@ -ldt1 = 1979-05-27T07:32:00 -ldt2 = 1979-05-27T00:32:00.999 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.json deleted file mode 100644 index 7a44ba2f..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "lt1": {"type": "time-local", "value": "07:32:00"}, - "lt2": {"type": "time-local", "value": "00:32:00.999"} -} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.toml deleted file mode 100644 index b838a2f4..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-time-0.toml +++ /dev/null @@ -1,2 +0,0 @@ -lt1 = 07:32:00 -lt2 = 00:32:00.999 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.toml deleted file mode 100644 index ffb5a399..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.toml +++ /dev/null @@ -1,3 +0,0 @@ -odt1 = 1979-05-27T07:32:00Z -odt2 = 1979-05-27T00:32:00-07:00 -odt3 = 1979-05-27T00:32:00.999-07:00 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.toml deleted file mode 100644 index b6115490..00000000 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.toml +++ /dev/null @@ -1 +0,0 @@ -str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF." diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/comment-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-0.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/comment-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-0.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/comment-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-0.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/comment-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-0.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/key-value-pair-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-1.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/key-value-pair-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-1.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/key-value-pair-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-1.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/key-value-pair-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-1.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-5.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-10.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-5.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-10.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-6.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-10.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-6.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-10.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-7.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-11.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-7.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-11.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-7.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-11.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-7.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-11.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.toml new file mode 100644 index 00000000..3c3eccc8 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-12.toml @@ -0,0 +1 @@ +str = "I'm a string. \"You can quote me\". Name\tJos\xE9\nLocation\tSF." diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-13.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-13.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-13.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-13.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-14.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-14.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-14.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-14.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-3.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-15.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-15.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-15.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-15.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-4.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-16.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-4.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-16.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-4.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-16.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-4.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-16.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-5.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-17.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-5.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-17.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-5.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-17.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-5.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-17.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.json similarity index 65% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.json index 526d1e17..4c46e9b1 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.json @@ -1,4 +1,4 @@ { - "lines": {"type": "string", "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"}, + "lines": {"type": "string", "value": "The first newline is\ntrimmed in literal strings.\n All other whitespace\n is preserved.\n"}, "regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"} } diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.toml similarity index 81% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.toml index bc88494c..7b33ce52 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-6.toml +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-18.toml @@ -1,7 +1,7 @@ regex2 = '''I [dw]on't need \d{2} apples''' lines = ''' The first newline is -trimmed in raw strings. +trimmed in literal strings. All other whitespace is preserved. ''' diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-7.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-19.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-7.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-19.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-7.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-19.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/string-7.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-19.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-20.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-20.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-20.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-20.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-21.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-21.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-21.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-21.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-22.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-22.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-22.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/integer-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-22.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-23.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-23.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-23.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-23.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-24.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-24.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-24.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-24.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-25.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-25.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-25.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/float-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-25.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/boolean-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-26.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/boolean-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-26.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/boolean-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-26.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/boolean-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-26.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.json similarity index 52% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.json index b292980c..b0e0d69c 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-0.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.json @@ -1,5 +1,6 @@ { "odt1": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}, "odt2": {"type": "datetime", "value": "1979-05-27T00:32:00-07:00"}, - "odt3": {"type": "datetime", "value": "1979-05-27T00:32:00.999-07:00"} + "odt3": {"type": "datetime", "value": "1979-05-27T00:32:00.5-07:00"}, + "odt4": {"type": "datetime", "value": "1979-05-27T00:32:00.999-07:00"} } diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.toml new file mode 100644 index 00000000..7435514f --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-27.toml @@ -0,0 +1,4 @@ +odt1 = 1979-05-27T07:32:00Z +odt2 = 1979-05-27T00:32:00-07:00 +odt3 = 1979-05-27T00:32:00.5-07:00 +odt4 = 1979-05-27T00:32:00.999-07:00 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-28.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-28.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-28.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/offset-date-time-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-28.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.json new file mode 100644 index 00000000..e652bb1e --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.json @@ -0,0 +1,4 @@ +{ + "odt5": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}, + "odt6": {"type": "datetime", "value": "1979-05-27T07:32:00-07:00"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.toml new file mode 100644 index 00000000..435ee11c --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-29.toml @@ -0,0 +1,2 @@ +odt5 = 1979-05-27 07:32Z +odt6 = 1979-05-27 07:32-07:00 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-3.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-3.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-3.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-3.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.json new file mode 100644 index 00000000..59622ddd --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.json @@ -0,0 +1,5 @@ +{ + "ldt1": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}, + "ldt2": {"type": "datetime-local", "value": "1979-05-27T07:32:00.5"}, + "ldt3": {"type": "datetime-local", "value": "1979-05-27T00:32:00.999"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.toml new file mode 100644 index 00000000..593ad755 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-30.toml @@ -0,0 +1,3 @@ +ldt1 = 1979-05-27T07:32:00 +ldt2 = 1979-05-27T07:32:00.5 +ldt3 = 1979-05-27T00:32:00.999 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.json new file mode 100644 index 00000000..2906e258 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.json @@ -0,0 +1,3 @@ +{ + "ldt3": {"type": "datetime-local", "value": "1979-05-27T07:32:00"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.toml new file mode 100644 index 00000000..ea9a7f87 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-31.toml @@ -0,0 +1 @@ +ldt3 = 1979-05-27T07:32 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-32.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-32.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-32.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/local-date-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-32.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.json new file mode 100644 index 00000000..f937c22b --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.json @@ -0,0 +1,5 @@ +{ + "lt1": {"type": "time-local", "value": "07:32:00"}, + "lt2": {"type": "time-local", "value": "00:32:00.5"}, + "lt3": {"type": "time-local", "value": "00:32:00.999"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.toml new file mode 100644 index 00000000..77e997c8 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-33.toml @@ -0,0 +1,3 @@ +lt1 = 07:32:00 +lt2 = 00:32:00.5 +lt3 = 00:32:00.999 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.json new file mode 100644 index 00000000..a978faec --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.json @@ -0,0 +1,3 @@ +{ + "lt3": {"type": "time-local", "value": "07:32:00"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.toml new file mode 100644 index 00000000..96c943de --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-34.toml @@ -0,0 +1 @@ +lt3 = 07:32 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-35.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-35.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-35.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-35.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-36.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-36.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-36.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-36.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-37.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-37.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-37.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-37.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-38.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-38.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-38.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-38.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-39.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-39.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-39.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-39.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-4.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-4.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-4.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-4.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-3.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-40.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-40.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-40.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-40.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-4.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-41.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-4.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-41.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-4.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-41.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-4.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-41.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-5.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-42.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-5.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-42.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-5.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-42.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-5.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-42.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-6.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-43.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-6.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-43.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-6.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-43.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-6.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-43.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-7.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-44.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-7.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-44.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-7.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-44.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-7.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-44.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-8.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-45.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-8.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-45.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-8.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-45.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-8.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-45.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-9.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-46.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-9.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-46.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-9.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-46.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/table-9.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-46.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.json similarity index 50% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.json index 2581c48c..bcbd035b 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-0.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.json @@ -4,6 +4,16 @@ "name": {"type": "string", "value": "pug"} } }, + "contact": { + "personal": { + "email": {"type": "string", "value": "donald@duckburg.com"}, + "name": {"type": "string", "value": "Donald Duck"} + }, + "work": { + "email": {"type": "string", "value": "donald@ScroogeCorp.com"}, + "name": {"type": "string", "value": "Coin cleaner"} + } + }, "name": { "first": {"type": "string", "value": "Tom"}, "last": {"type": "string", "value": "Preston-Werner"} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.toml new file mode 100644 index 00000000..e25a05d5 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-47.toml @@ -0,0 +1,13 @@ +name = { first = "Tom", last = "Preston-Werner" } +point = {x=1, y=2} +animal = { type.name = "pug" } +contact = { + personal = { + name = "Donald Duck", + email = "donald@duckburg.com", + }, + work = { + name = "Coin cleaner", + email = "donald@ScroogeCorp.com", + }, +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.json similarity index 50% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.json index 2581c48c..bcbd035b 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-1.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.json @@ -4,6 +4,16 @@ "name": {"type": "string", "value": "pug"} } }, + "contact": { + "personal": { + "email": {"type": "string", "value": "donald@duckburg.com"}, + "name": {"type": "string", "value": "Donald Duck"} + }, + "work": { + "email": {"type": "string", "value": "donald@ScroogeCorp.com"}, + "name": {"type": "string", "value": "Coin cleaner"} + } + }, "name": { "first": {"type": "string", "value": "Tom"}, "last": {"type": "string", "value": "Preston-Werner"} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.toml new file mode 100644 index 00000000..1e5ac12d --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-48.toml @@ -0,0 +1,18 @@ +[name] +first = "Tom" +last = "Preston-Werner" + +[point] +x = 1 +y = 2 + +[animal] +type.name = "pug" + +[contact.personal] +name = "Donald Duck" +email = "donald@duckburg.com" + +[contact.work] +name = "Coin cleaner" +email = "donald@ScroogeCorp.com" diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-49.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-49.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-49.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-49.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-3.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-50.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-50.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-50.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/inline-table-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-50.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.json similarity index 95% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.json index 6af8655c..1d3f2d43 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.json +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.json @@ -1,5 +1,5 @@ { - "products": [ + "product": [ { "name": {"type": "string", "value": "Hammer"}, "sku": {"type": "integer", "value": "738594937"} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.toml similarity index 52% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.toml index 544d142d..adc6aa55 100644 --- a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-0.toml +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-51.toml @@ -1,10 +1,10 @@ -[[products]] +[[product]] name = "Hammer" sku = 738594937 -[[products]] # empty table within the array +[[product]] # empty table within the array -[[products]] +[[product]] name = "Nail" sku = 284758393 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-1.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-52.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-1.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-52.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-1.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-52.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-1.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-52.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-2.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-53.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-2.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-53.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-2.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-53.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/array-of-tables-2.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-53.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-3.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-6.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-3.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-6.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-3.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-6.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-3.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-6.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-4.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.toml new file mode 100644 index 00000000..4629e39a --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-7.toml @@ -0,0 +1,3 @@ +fruit.name = "banana" # this is best practice +fruit. color = "yellow" # same as fruit.color +fruit . flavor = "banana" # same as fruit.flavor diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.json new file mode 100644 index 00000000..81c42eff --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.json @@ -0,0 +1,8 @@ +{ + "fruit": { + "orange": {"type": "integer", "value": "2"}, + "apple": { + "smooth": {"type": "bool", "value": "true"} + } + } +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.toml new file mode 100644 index 00000000..b4d1b37e --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-8.toml @@ -0,0 +1,5 @@ +# This makes the key "fruit" into a table. +fruit.apple.smooth = true + +# So then you can add to the table "fruit" like so: +fruit.orange = 2 diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-6.json b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-9.json similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-6.json rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-9.json diff --git a/Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-5.toml b/Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-9.toml similarity index 100% rename from Tests/TOMLDecoderTests/valid_fixtures/spec-1.0.0/keys-5.toml rename to Tests/TOMLDecoderTests/valid_fixtures/spec-1.1.0/common-9.toml diff --git a/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.json b/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.json new file mode 100644 index 00000000..5ecfd547 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.json @@ -0,0 +1,3 @@ +{ + "esc": {"type": "string", "value": "\u001b There is no escape! \u001b"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.toml b/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.toml new file mode 100644 index 00000000..1e158fe1 --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/string/escape-esc.toml @@ -0,0 +1 @@ +esc = "\e There is no escape! \e" diff --git a/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.json b/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.json new file mode 100644 index 00000000..c2200cfc --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.json @@ -0,0 +1,10 @@ +{ + "bs": {"type": "string", "value": ""}, + "hello": {"type": "string", "value": "hello\n"}, + "higher-than-127": {"type": "string", "value": "Sørmirbæren"}, + "literal": {"type": "string", "value": "\\x20 \\x09 \\x0d\\x0a"}, + "multiline": {"type": "string", "value": " \t \u001b \r\n\n\n\u0000\nhello\n\nSørmirbæren\n"}, + "multiline-literal": {"type": "string", "value": "\\x20 \\x09 \\x0d\\x0a\n"}, + "nul": {"type": "string", "value": "\u0000"}, + "whitespace": {"type": "string", "value": " \t \u001b \r\n"} +} diff --git a/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.toml b/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.toml new file mode 100644 index 00000000..26d1668f --- /dev/null +++ b/Tests/TOMLDecoderTests/valid_fixtures/string/hex-escape.toml @@ -0,0 +1,21 @@ +# \x for the first 255 codepoints + +whitespace = "\x20 \x09 \x1b \x0d\x0a" +bs = "\x7f" +nul = "\x00" +hello = "\x68\x65\x6c\x6c\x6f\x0a" +higher-than-127 = "S\xf8rmirb\xe6ren" + +multiline = """ +\x20 \x09 \x1b \x0d\x0a +\x7f +\x00 +\x68\x65\x6c\x6c\x6f\x0a +\x53\xF8\x72\x6D\x69\x72\x62\xE6\x72\x65\x6E +""" + +# Not inside literals. +literal = '\x20 \x09 \x0d\x0a' +multiline-literal = ''' +\x20 \x09 \x0d\x0a +''' From 51198b1a0502a2a953a565a6c58b39e86ffdb31b Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 12:15:19 +0100 Subject: [PATCH 07/11] TOML 1.1.0: Allow newlines and trailing commas in inline tables https://github.com/toml-lang/toml/pull/904 This commit fixes the following tests: - [inline-table] newline - [inline-table] newline comment --- Sources/TOMLDecoder/Parsing/Parser.swift | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 81d0610e..64d117b2 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -602,9 +602,7 @@ struct Parser: ~Copyable { try eatToken(bytes: bytes, kind: .lbrace, isDotSpecial: true) while true { - if token.kind == .newline { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "newline not allowed in inline table")) - } + try skipNewlines(bytes: bytes, isDotSpecial: false) if token.kind == .rbrace { break @@ -616,16 +614,10 @@ struct Parser: ~Copyable { try parseKeyValue(bytes: bytes, tableIndex: tableIndex, isKeyed: true) - if token.kind == .newline { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "newline not allowed in inline table")) - } + try skipNewlines(bytes: bytes, isDotSpecial: false) if token.kind == .comma { try eatToken(bytes: bytes, kind: .comma, isDotSpecial: true) - // Check for trailing comma - if next token is rbrace, it's a trailing comma error - if token.kind == .rbrace { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "trailing comma not allowed in inline table")) - } continue } break @@ -640,9 +632,7 @@ struct Parser: ~Copyable { try eatToken(bytes: bytes, kind: .lbrace, isDotSpecial: true) while true { - if token.kind == .newline { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "newline not allowed in inline table")) - } + try skipNewlines(bytes: bytes, isDotSpecial: false) if token.kind == .rbrace { break @@ -654,16 +644,10 @@ struct Parser: ~Copyable { try parseKeyValue(bytes: bytes, tableIndex: tableIndex, isKeyed: false) - if token.kind == .newline { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "newline not allowed in inline table")) - } + try skipNewlines(bytes: bytes, isDotSpecial: false) if token.kind == .comma { try eatToken(bytes: bytes, kind: .comma, isDotSpecial: true) - // Check for trailing comma - if next token is rbrace, it's a trailing comma error - if token.kind == .rbrace { - throw TOMLError(.syntax(lineNumber: token.lineNumber, message: "trailing comma not allowed in inline table")) - } continue } break From 61abe9ecf619121cff792f1b2db950adeccc6a53 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 15:23:55 +0100 Subject: [PATCH 08/11] TOML 1.1.0: Seconds in datetime and time values are now optional https://github.com/toml-lang/toml/pull/894 This commit fixes the following tests: - [spec-1.1.0] common 34 - [spec-1.1.0] common 29 - [spec-1.1.0] common 31 - [datetime] no seconds --- Sources/TOMLDecoder/Parsing/Parser.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 64d117b2..90e33446 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -1658,7 +1658,7 @@ func scanTime(bytes: UnsafeBufferPointer, range: Range) -> (Int, Int index += 2 guard index < range.upperBound, bytes[index] == CodeUnits.colon else { - return nil + return (hour, minute, 0, index) // Seconds are optional since 1.1.0. When omitted, :00 seconds is assumed } index += 1 From 9bc13842e3b229117bdd4fe3f19ecd56b66cf0f6 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 15:55:40 +0100 Subject: [PATCH 09/11] TOML 1.1.0: Support \e escape for the escape character https://github.com/toml-lang/toml/pull/790 This commit fixes the following test: - [string] escape esc --- Sources/TOMLDecoder/Parsing/Constants.swift | 1 + Sources/TOMLDecoder/Parsing/Parser.swift | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Sources/TOMLDecoder/Parsing/Constants.swift b/Sources/TOMLDecoder/Parsing/Constants.swift index 79699fe4..f5b22610 100644 --- a/Sources/TOMLDecoder/Parsing/Constants.swift +++ b/Sources/TOMLDecoder/Parsing/Constants.swift @@ -1,4 +1,5 @@ enum CodeUnits { + static let escape: UTF8.CodeUnit = 27 static let equal: UTF8.CodeUnit = 61 static let comma: UTF8.CodeUnit = 44 static let lbrace: UTF8.CodeUnit = 123 diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 90e33446..28233f96 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -1586,6 +1586,8 @@ func basicString(bytes: UnsafeBufferPointer, range: Range, multiline ch = CodeUnits.cr } else if ch == CodeUnits.lowerN { ch = CodeUnits.lf + } else if ch == CodeUnits.lowerE { + ch = CodeUnits.escape } else if ch != CodeUnits.doubleQuote, ch != CodeUnits.backslash { throw TOMLError(.illegalEscapeCharacter(ch)) } From c6e50ecec094ab432b6bf2262412a961e8fa0f81 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 16:00:01 +0100 Subject: [PATCH 10/11] TOML 1.1.0: Support \xHH notation to basic strings for codepoints <255 https://github.com/toml-lang/toml/pull/796 This commit fixes all the remaining TOML 1.1.0 tests, namely: - [string] hex escape - [spec-1.1.0] common 12 --- Sources/TOMLDecoder/Parsing/Parser.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 28233f96..ffd1c606 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -1549,8 +1549,13 @@ func basicString(bytes: UnsafeBufferPointer, range: Range, multiline ch = bytes[index] index += 1 - if ch == CodeUnits.lowerU || ch == CodeUnits.upperU { - let hexCount = (ch == CodeUnits.lowerU ? 4 : 8) + if ch == CodeUnits.lowerU || ch == CodeUnits.upperU || ch == CodeUnits.lowerX { + let hexCount = switch ch { + case CodeUnits.lowerU: 4 + case CodeUnits.upperU: 8 + case CodeUnits.lowerX: 2 + default: fatalError("Unsupported CodeUnit: \(ch)") + } var ucs: UInt32 = 0 for _ in 0 ..< hexCount { if index >= endIndex { From 5c793ed3b74c187036f58b4305bd4d5c4237d7e7 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 4 Feb 2026 17:27:01 +0100 Subject: [PATCH 11/11] Docs: Now, we fully implement TOML 1.1.0 --- README.md | 2 +- Sources/TOMLDecoder/TOMLDecoder.docc/TOMLDecoder.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fb149ab..578d1f5b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # TOMLDecoder A fast, Swift-native, minimal dependency library -that fully implements [TOML](https://toml.io/) spec 1.0. +that fully implements [TOML](https://toml.io/) spec 1.1.0. ```swift struct Team: Codable { diff --git a/Sources/TOMLDecoder/TOMLDecoder.docc/TOMLDecoder.md b/Sources/TOMLDecoder/TOMLDecoder.docc/TOMLDecoder.md index ac716d8b..cd7d7d5d 100644 --- a/Sources/TOMLDecoder/TOMLDecoder.docc/TOMLDecoder.md +++ b/Sources/TOMLDecoder/TOMLDecoder.docc/TOMLDecoder.md @@ -9,7 +9,7 @@ It converts TOML into your `Codable` types It provides fast TOML deserialization (like `JSONDeserializer` for JSON), and type-safe access to parsed results. -`TOMLDecoder` implements the TOML 1.0 spec. +`TOMLDecoder` implements the TOML 1.1.0 spec. This library can do 2 things to TOML: * **Deserialize**: