Added more values to Test objects
This commit is contained in:
parent
c8d0a4fe57
commit
3313033020
|
@ -6,6 +6,38 @@ final class WTVTests: XCTestCase {
|
||||||
case green
|
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 {
|
struct Dictionary {
|
||||||
var value = [
|
var value = [
|
||||||
"someValue": [
|
"someValue": [
|
||||||
|
@ -15,7 +47,14 @@ final class WTVTests: XCTestCase {
|
||||||
Color.green: [
|
Color.green: [
|
||||||
2,5,6,7,
|
2,5,6,7,
|
||||||
|
|
||||||
["what": "👋"] // ++
|
[
|
||||||
|
"what": "👋", // ++
|
||||||
|
|
||||||
|
"???": [
|
||||||
|
"what": "👀", // ++
|
||||||
|
"-->": SomeObject() // += 6
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -24,17 +63,11 @@ final class WTVTests: XCTestCase {
|
||||||
|
|
||||||
struct Value {
|
struct Value {
|
||||||
let somes = [
|
let somes = [
|
||||||
Dictionary(), // += 3
|
"what": 3.14, // ++
|
||||||
|
"deeper": Something()
|
||||||
|
] as [String : Any]
|
||||||
|
|
||||||
"what",
|
let thing = Dictionary()
|
||||||
"the",
|
|
||||||
"variable",
|
|
||||||
|
|
||||||
[
|
|
||||||
"what": 3.14 // ++
|
|
||||||
],
|
|
||||||
Dictionary() // += 3
|
|
||||||
] as [Any]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RootValue {
|
struct RootValue {
|
||||||
|
@ -45,6 +78,13 @@ final class WTVTests: XCTestCase {
|
||||||
let root = RootValue()
|
let root = RootValue()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Something {
|
||||||
|
let what = "else" // ++
|
||||||
|
let wow = [
|
||||||
|
"what": 3.14, // ++
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
func testExample() {
|
func testExample() {
|
||||||
guard let output = WTV(OuterValue()).variable(named: "what") else {
|
guard let output = WTV(OuterValue()).variable(named: "what") else {
|
||||||
XCTFail()
|
XCTFail()
|
||||||
|
@ -57,6 +97,6 @@ final class WTVTests: XCTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
static var allTests = [
|
static var allTests = [
|
||||||
("testExample", testExample),
|
("testExample", testExample)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue