From f7fc8a6eca14b2c93fbe7a8c1c5162a1f9d59223 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Mon, 16 Jan 2023 13:05:29 +0530 Subject: [PATCH] Updated method names in tests --- .../ios/test/text/text_classifier/MPPTextClassifierTests.m | 7 +++---- .../test/text/text_classifier/TextClassifierTests.swift | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mediapipe/tasks/ios/test/text/text_classifier/MPPTextClassifierTests.m b/mediapipe/tasks/ios/test/text/text_classifier/MPPTextClassifierTests.m index 3e2fe4be..a8e54101 100644 --- a/mediapipe/tasks/ios/test/text/text_classifier/MPPTextClassifierTests.m +++ b/mediapipe/tasks/ios/test/text/text_classifier/MPPTextClassifierTests.m @@ -43,7 +43,6 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; #define AssertTextClassifierResultHasOneHead(textClassifierResult) \ XCTAssertNotNil(textClassifierResult); \ - \ XCTAssertNotNil(textClassifierResult.classificationResult); \ XCTAssertEqual(textClassifierResult.classificationResult.classifications.count, 1); \ XCTAssertEqual(textClassifierResult.classificationResult.classifications[0].headIndex, 0); @@ -156,7 +155,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; AssertEqualErrors(error, expectedError); } -- (void)testCreateTextClassifierFailsWithBothAllowListAndDenyList { +- (void)testCreateTextClassifierFailsWithBothAllowlistAndDenylist { MPPTextClassifierOptions *options = [self textClassifierOptionsWithModelName:kBertTextClassifierModelName]; options.categoryAllowlist = @[ @"positive" ]; @@ -233,7 +232,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; expectedBertResultCategoriesForEdgeCaseTests]]; } -- (void)testClassifyWithCategoryAllowListSucceeds { +- (void)testClassifyWithCategoryAllowlistSucceeds { MPPTextClassifierOptions *options = [self textClassifierOptionsWithModelName:kBertTextClassifierModelName]; options.categoryAllowlist = @[ @"negative" ]; @@ -250,7 +249,7 @@ static NSString *const kExpectedErrorDomain = @"com.google.mediapipe.tasks"; expectedBertResultCategoriesForEdgeCaseTests]]; } -- (void)testClassifyWithCategoryDenyListSucceeds { +- (void)testClassifyWithCategoryDenylistSucceeds { MPPTextClassifierOptions *options = [self textClassifierOptionsWithModelName:kBertTextClassifierModelName]; options.categoryDenylist = @[ @"positive" ]; diff --git a/mediapipe/tasks/ios/test/text/text_classifier/TextClassifierTests.swift b/mediapipe/tasks/ios/test/text/text_classifier/TextClassifierTests.swift index d2d433c2..01b5748c 100644 --- a/mediapipe/tasks/ios/test/text/text_classifier/TextClassifierTests.swift +++ b/mediapipe/tasks/ios/test/text/text_classifier/TextClassifierTests.swift @@ -147,7 +147,7 @@ class TextClassifierTests: XCTestCase { """) } - func testCreateTextClassifierWithCategoryAllowlistandDenylistFails() throws { + func testCreateTextClassifierWithCategoryAllowlistAndDenylistFails() throws { let textClassifierOptions = try XCTUnwrap(