1// Copyright 2019 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#import <UIKit/UIKit.h> 6#import <XCTest/XCTest.h> 7 8#import "base/test/ios/google_test_runner_delegate.h" 9 10@interface GoogleTestRunner : XCTestCase 11@end 12 13@implementation GoogleTestRunner 14 15- (void)testRunGoogleTests { 16 self.continueAfterFailure = false; 17 18 id appDelegate = UIApplication.sharedApplication.delegate; 19 XCTAssertTrue( 20 [appDelegate conformsToProtocol:@protocol(GoogleTestRunnerDelegate)]); 21 22 id<GoogleTestRunnerDelegate> runnerDelegate = 23 static_cast<id<GoogleTestRunnerDelegate>>(appDelegate); 24 XCTAssertTrue(runnerDelegate.supportsRunningGoogleTests); 25 XCTAssertTrue([runnerDelegate runGoogleTests] == 0); 26} 27 28@end 29