Updated error tests to use XCTAssertEqualObjects
This commit is contained in:
parent
87f525c76b
commit
fda001b666
|
@ -28,9 +28,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks";
|
||||||
XCTAssertNotNil(error); \
|
XCTAssertNotNil(error); \
|
||||||
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
||||||
XCTAssertEqual(error.code, expectedError.code); \
|
XCTAssertEqual(error.code, expectedError.code); \
|
||||||
XCTAssertNotEqual( \
|
XCTAssertEqualObjects(error.localizedDescription, expectedError.localizedDescription)
|
||||||
[error.localizedDescription rangeOfString:expectedError.localizedDescription].location, \
|
|
||||||
NSNotFound)
|
|
||||||
|
|
||||||
#define AssertEqualCategoryArrays(categories, expectedCategories) \
|
#define AssertEqualCategoryArrays(categories, expectedCategories) \
|
||||||
XCTAssertEqual(categories.count, expectedCategories.count); \
|
XCTAssertEqual(categories.count, expectedCategories.count); \
|
||||||
|
|
|
@ -29,9 +29,7 @@ static const float kSimilarityDiffTolerance = 1e-4;
|
||||||
XCTAssertNotNil(error); \
|
XCTAssertNotNil(error); \
|
||||||
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
||||||
XCTAssertEqual(error.code, expectedError.code); \
|
XCTAssertEqual(error.code, expectedError.code); \
|
||||||
XCTAssertNotEqual( \
|
XCTAssertEqualObjects(error.localizedDescription, expectedError.localizedDescription) \
|
||||||
[error.localizedDescription rangeOfString:expectedError.localizedDescription].location, \
|
|
||||||
NSNotFound)
|
|
||||||
|
|
||||||
#define AssertTextEmbedderResultHasOneEmbedding(textEmbedderResult) \
|
#define AssertTextEmbedderResultHasOneEmbedding(textEmbedderResult) \
|
||||||
XCTAssertNotNil(textEmbedderResult); \
|
XCTAssertNotNil(textEmbedderResult); \
|
||||||
|
|
|
@ -34,9 +34,7 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
XCTAssertNotNil(error); \
|
XCTAssertNotNil(error); \
|
||||||
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
||||||
XCTAssertEqual(error.code, expectedError.code); \
|
XCTAssertEqual(error.code, expectedError.code); \
|
||||||
XCTAssertNotEqual( \
|
XCTAssertEqualObjects(error.localizedDescription, expectedError.localizedDescription) \
|
||||||
[error.localizedDescription rangeOfString:expectedError.localizedDescription].location, \
|
|
||||||
NSNotFound)
|
|
||||||
|
|
||||||
#define AssertEqualCategoryArrays(categories, expectedCategories) \
|
#define AssertEqualCategoryArrays(categories, expectedCategories) \
|
||||||
XCTAssertEqual(categories.count, expectedCategories.count); \
|
XCTAssertEqual(categories.count, expectedCategories.count); \
|
||||||
|
|
|
@ -32,9 +32,7 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
|
||||||
XCTAssertNotNil(error); \
|
XCTAssertNotNil(error); \
|
||||||
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
XCTAssertEqualObjects(error.domain, expectedError.domain); \
|
||||||
XCTAssertEqual(error.code, expectedError.code); \
|
XCTAssertEqual(error.code, expectedError.code); \
|
||||||
XCTAssertNotEqual( \
|
XCTAssertEqualObjects(error.localizedDescription, expectedError.localizedDescription)
|
||||||
[error.localizedDescription rangeOfString:expectedError.localizedDescription].location, \
|
|
||||||
NSNotFound)
|
|
||||||
|
|
||||||
#define AssertEqualCategories(category, expectedCategory, detectionIndex, categoryIndex) \
|
#define AssertEqualCategories(category, expectedCategory, detectionIndex, categoryIndex) \
|
||||||
XCTAssertEqual(category.index, expectedCategory.index, \
|
XCTAssertEqual(category.index, expectedCategory.index, \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user