Flutter Engine
GoldenPlatformViewTests.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
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 <XCTest/XCTest.h>
7 
9 
10 // The base class of all the PlatformView golden tests.
11 //
12 // A new PlatformView golden tests can subclass this and override the `-initiWithInvocation:`
13 // method, which then retun the `-initWithManager:invocation:`
14 //
15 // Then in any test method, call `checkGolden` to perform the golden test.
16 //
17 // This base class doesn't run any test case on its own.
18 @interface GoldenPlatformViewTests : XCTestCase
19 
20 @property(nonatomic, strong) XCUIApplication* application;
21 
22 // Initialize with a `PlatformViewGoldenTestManager`.
23 - (instancetype)initWithManager:(PlatformViewGoldenTestManager*)manager
24  invocation:(NSInvocation*)invocation;
25 
26 // Take a sceenshot of the test app and check it has the same pixels with goldenImage inside the
27 // `PlatformViewGoldenTestManager`.
28 - (void)checkGolden;
29 
30 @end
31 
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19