Uncommented live stream test in iOS image segmenter tests
This commit is contained in:
		
							parent
							
								
									bac60548dc
								
							
						
					
					
						commit
						d9d4016334
					
				| 
						 | 
					@ -368,47 +368,44 @@ double softIOU(const float *mask1, const float *mask2, size_t size) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// - (void)testSegmentWithOutOfOrderTimestampsAndLiveStreamModeFails {
 | 
					- (void)testSegmentWithOutOfOrderTimestampsAndLiveStreamModeFails {
 | 
				
			||||||
//  MPPImageSegmenterOptions *options =
 | 
					  MPPImageSegmenterOptions *options =
 | 
				
			||||||
//       [self imageSegmenterOptionsWithModelFileInfo:kImageSegmenterModelFileInfo];
 | 
					      [self imageSegmenterOptionsWithModelFileInfo:kImageSegmenterModelFileInfo];
 | 
				
			||||||
//   options.runningMode = MPPRunningModeLiveStream;
 | 
					  options.runningMode = MPPRunningModeLiveStream;
 | 
				
			||||||
//   options.imageSegmenterLiveStreamDelegate = self;
 | 
					  options.imageSegmenterLiveStreamDelegate = self;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   XCTestExpectation *expectation = [[XCTestExpectation alloc]
 | 
					  XCTestExpectation *expectation = [[XCTestExpectation alloc]
 | 
				
			||||||
//       initWithDescription:@"segmentWithOutOfOrderTimestampsAndLiveStream"];
 | 
					      initWithDescription:@"segmentWithOutOfOrderTimestampsAndLiveStream"];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   expectation.expectedFulfillmentCount = 1;
 | 
					  expectation.expectedFulfillmentCount = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   MPPImageSegmenter *imageSegmenter = [self createImageSegmenterWithOptionsSucceeds:options];
 | 
					  MPPImageSegmenter *imageSegmenter = [self createImageSegmenterWithOptionsSucceeds:options];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   _outOfOrderTimestampTestDict = @{
 | 
					  _outOfOrderTimestampTestDict = @{
 | 
				
			||||||
//     kLiveStreamTestsDictImageSegmenterKey : imageSegmenter,
 | 
					    kLiveStreamTestsDictImageSegmenterKey : imageSegmenter,
 | 
				
			||||||
//     kLiveStreamTestsDictExpectationKey : expectation
 | 
					    kLiveStreamTestsDictExpectationKey : expectation
 | 
				
			||||||
//   };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   MPPImage *image = [MPPImage imageWithFileInfo:kCatImageFileInfo];
 | 
					  MPPImage *image = [MPPImage imageWithFileInfo:kCatImageFileInfo];
 | 
				
			||||||
//   XCTAssertNotNil(image);
 | 
					  XCTAssertNotNil(image);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   XCTAssertTrue([imageSegmenter segmentAsyncImage:image timestampInMilliseconds:1 error:nil]);
 | 
					  XCTAssertTrue([imageSegmenter segmentAsyncImage:image timestampInMilliseconds:1 error:nil]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   NSError *error;
 | 
					  NSError *error;
 | 
				
			||||||
//   XCTAssertFalse([imageSegmenter segmentAsyncImage:image
 | 
					  XCTAssertFalse([imageSegmenter segmentAsyncImage:image timestampInMilliseconds:0 error:&error]);
 | 
				
			||||||
//                                 timestampInMilliseconds:0
 | 
					 | 
				
			||||||
//                                                   error:&error]);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   NSError *expectedError =
 | 
					  NSError *expectedError =
 | 
				
			||||||
//       [NSError errorWithDomain:kExpectedErrorDomain
 | 
					      [NSError errorWithDomain:kExpectedErrorDomain
 | 
				
			||||||
//                           code:MPPTasksErrorCodeInvalidArgumentError
 | 
					                          code:MPPTasksErrorCodeInvalidArgumentError
 | 
				
			||||||
//                       userInfo:@{
 | 
					                      userInfo:@{
 | 
				
			||||||
//                         NSLocalizedDescriptionKey :
 | 
					                        NSLocalizedDescriptionKey :
 | 
				
			||||||
//                             @"INVALID_ARGUMENT: Input timestamp must be monotonically
 | 
					                            @"INVALID_ARGUMENT: Input timestamp must be monotonically increasing."
 | 
				
			||||||
//                             increasing."
 | 
					                      }];
 | 
				
			||||||
//                       }];
 | 
					  AssertEqualErrors(error, expectedError);
 | 
				
			||||||
//   AssertEqualErrors(error, expectedError);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
//   NSTimeInterval timeout = 0.5f;
 | 
					  NSTimeInterval timeout = 0.5f;
 | 
				
			||||||
//   [self waitForExpectations:@[ expectation ] timeout:timeout];
 | 
					  [self waitForExpectations:@[ expectation ] timeout:timeout];
 | 
				
			||||||
// }
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- (void)testSegmentWithLiveStreamModeSucceeds {
 | 
					- (void)testSegmentWithLiveStreamModeSucceeds {
 | 
				
			||||||
  MPPImageSegmenterOptions *options =
 | 
					  MPPImageSegmenterOptions *options =
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user