Skip to content

Commit

Permalink
Verify that JSONValue keeps Booleans, numbers apart
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Feb 7, 2022
1 parent 4366822 commit 4521333
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/TurfTests/JSONTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ class JSONTests: XCTestCase {
XCTFail()
}

if case JSONValue.boolean = 0 {
XCTFail()
}

if case JSONValue.boolean = 1 {
XCTFail()
}

if case JSONValue.number = false {
XCTFail()
}

if case JSONValue.number = true {
XCTFail()
}

if case let JSONValue.array(array) = ["Jason", 42, 3.1415, false, true, nil, [], [:]],
array.count == 8 {
if case let .string(string) = array[0] {
Expand Down

0 comments on commit 4521333

Please sign in to comment.