func testExample() { let view = MyView() view.frame = CGRect(x: 0, y: 0, width: 200, height: 200) FBSnapshotVerifyView(view, identifier: "MyView") }
// 设置标记为预期失败: func recordFailure(withDescription description: String, inFile filePath: String, atLine lineNumber: Int, expected: Bool) { let isSnapshot = description.contains("BackButton_") if isSnapshot { XCTFail(description, file: filePath, line: lineNumber) } else { super.recordFailure(withDescription: description, inFile: filePath, atLine: lineNumber, expected: expected) } }