Skip to content

Commit

Permalink
add encode test
Browse files Browse the repository at this point in the history
  • Loading branch information
hborawski committed Sep 27, 2024
1 parent 0dba0fc commit dadbce3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ios/core/Tests/Types/Generic/AnyTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class AnyTypeTests: XCTestCase {
XCTAssertEqual("[1,2]", doEncode(AnyType.numberArray(data: [1, 2])))
XCTAssertEqual("[false,true]", doEncode(AnyType.booleanArray(data: [false, true])))
XCTAssertEqual("{\"a\":false,\"b\":1}", doEncode(AnyType.anyDictionary(data: ["a": false, "b": 1])))
XCTAssertEqual("{\"key\":[{\"nestedKey\":\"nestedValue\"}],\"key2\":1}", doEncode(AnyType.anyDictionary(data: ["key2": 1, "key": AnyType.anyArray(data: [["nestedKey": "nestedValue"]])])))
}

func doEncode(_ data: AnyType) -> String? {
Expand Down

0 comments on commit dadbce3

Please sign in to comment.