Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ DeriveredData/
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings
Carthage/Build/
/.swiftpm
1 change: 1 addition & 0 deletions Sources/AnyCodable/AnyCodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ extension AnyCodable: ExpressibleByBooleanLiteral {}
extension AnyCodable: ExpressibleByIntegerLiteral {}
extension AnyCodable: ExpressibleByFloatLiteral {}
extension AnyCodable: ExpressibleByStringLiteral {}
extension AnyCodable: ExpressibleByStringInterpolation {}
extension AnyCodable: ExpressibleByArrayLiteral {}
extension AnyCodable: ExpressibleByDictionaryLiteral {}

Expand Down
5 changes: 4 additions & 1 deletion Tests/AnyCodableTests/AnyCodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ class AnyCodableTests: XCTestCase {
func testJSONEncoding() throws {

let someCodable = AnyCodable(SomeCodable(string: "String", int: 100, bool: true, hasUnderscore: "another string"))


let injectedValue = 1234
let dictionary: [String: AnyCodable] = [
"boolean": true,
"integer": 42,
"double": 3.141592653589793,
"string": "string",
"stringInterpolation": "string \(injectedValue)",
"array": [1, 2, 3],
"nested": [
"a": "alpha",
Expand All @@ -108,6 +110,7 @@ class AnyCodableTests: XCTestCase {
"integer": 42,
"double": 3.141592653589793,
"string": "string",
"stringInterpolation": "string 1234",
"array": [1, 2, 3],
"nested": {
"a": "alpha",
Expand Down