From 331303302084d6949c03868e685bbd981396221d Mon Sep 17 00:00:00 2001 From: Zach Eriksen Date: Sat, 13 Mar 2021 12:42:15 -0600 Subject: [PATCH] Added more values to Test objects --- Tests/WTVTests/WTVTests.swift | 66 ++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/Tests/WTVTests/WTVTests.swift b/Tests/WTVTests/WTVTests.swift index 2937709..c196f9c 100644 --- a/Tests/WTVTests/WTVTests.swift +++ b/Tests/WTVTests/WTVTests.swift @@ -6,6 +6,38 @@ final class WTVTests: XCTestCase { case green } + struct SomeObject { + enum SomeCase { + case what + } + + enum SomeStringCase: String { + case what + } + + enum WoahCase { + case woah(what: Any) + } + + let dictionary = [ + SomeCase.what: "ðŸšĻ", // ++ + SomeStringCase.what: "ðŸ˜ą" // ++ + ] as [AnyHashable : String] + + let what = "😎" // ++ + + let woah = WoahCase.woah( + what: { + let what = "ðŸ”Ŧ" + + let dictionary = [ + SomeCase.what: "ðŸŠĶ", + SomeStringCase.what: "ðŸ’Đ" + ] as [AnyHashable : String] + } // ++ + ) + } + struct Dictionary { var value = [ "someValue": [ @@ -15,7 +47,14 @@ final class WTVTests: XCTestCase { Color.green: [ 2,5,6,7, - ["what": "👋"] // ++ + [ + "what": "👋", // ++ + + "???": [ + "what": "👀", // ++ + "-->": SomeObject() // += 6 + ] + ] ] ] ] @@ -24,17 +63,11 @@ final class WTVTests: XCTestCase { struct Value { let somes = [ - Dictionary(), // += 3 - - "what", - "the", - "variable", - - [ - "what": 3.14 // ++ - ], - Dictionary() // += 3 - ] as [Any] + "what": 3.14, // ++ + "deeper": Something() + ] as [String : Any] + + let thing = Dictionary() } struct RootValue { @@ -45,6 +78,13 @@ final class WTVTests: XCTestCase { let root = RootValue() } + struct Something { + let what = "else" // ++ + let wow = [ + "what": 3.14, // ++ + ] + } + func testExample() { guard let output = WTV(OuterValue()).variable(named: "what") else { XCTFail() @@ -57,6 +97,6 @@ final class WTVTests: XCTestCase { } static var allTests = [ - ("testExample", testExample), + ("testExample", testExample) ] }