We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c09116 commit 759010eCopy full SHA for 759010e
Tests/Foundation/Tests/TestNSError.swift
@@ -149,12 +149,13 @@ class TestNSError : XCTestCase {
149
}
150
151
func test_ConvertErrorToNSError_errorCodeWithAssosiatedValue() {
152
+ // Default error code for enum case is based on EnumImplStrategy::getTagIndex
153
enum SwiftError: Error {
- case one
154
- case two
155
- case three(String)
156
- case four
157
- case five(String)
+ case one // 2
+ case two // 3
+ case three(String) // 0
+ case four // 4
158
+ case five(String) // 1
159
160
161
XCTAssertEqual((SwiftError.one as NSError).code, 2)
0 commit comments