I'm trying to write tests for functions that return enum cases with associated values. Is there a less awkward way to write this:
if case MyEnum.someCase(value1: 42, value2: "hello") = testResult {
// pass
} else {
XCTFail()
}
It would be nice if pattern matching was a bit more composable. Maybe case ...
could return a boolean or something, or maybe I'm just thinking about this wrong.