Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Replace fixture subclasses with usings #48111

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,11 @@ @implementation AccessibilityBridgeTestViewController
FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityBridgeMacWindowTest);
};

// AutoreleasePoolTest subclass that exists simply to provide more specific naming.
class AccessibilityBridgeMacTest : public AutoreleasePoolTest {
public:
AccessibilityBridgeMacTest() = default;
~AccessibilityBridgeMacTest() = default;

private:
FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityBridgeMacTest);
};

NSWindow* AccessibilityBridgeMacWindowTest::gWindow_ = nil;

// Test-specific name for AutoreleasePoolTest fixture.
using AccessibilityBridgeMacTest = AutoreleasePoolTest;

} // namespace

TEST_F(AccessibilityBridgeMacWindowTest, SendsAccessibilityCreateNotificationFlutterViewWindow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,8 @@ - (CVPixelBufferRef)pixelBuffer {

namespace flutter::testing {

// AutoreleasePoolTest subclass that exists simply to provide more specific naming.
class FlutterEmbedderExternalTextureTest : public AutoreleasePoolTest {
public:
FlutterEmbedderExternalTextureTest() = default;
~FlutterEmbedderExternalTextureTest() = default;

private:
FML_DISALLOW_COPY_AND_ASSIGN(FlutterEmbedderExternalTextureTest);
};
// Test-specific name for AutoreleasePoolTest fixture.
using FlutterEmbedderExternalTextureTest = AutoreleasePoolTest;

TEST_F(FlutterEmbedderExternalTextureTest, TestTextureResolution) {
// Constants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,9 @@ id MockGestureEvent(NSEventType type, NSEventPhase phase, double magnification,

#pragma mark - gtest tests

// AutoreleasePoolTest subclass that exists simply to provide more specific naming.
class FlutterViewControllerTest : public AutoreleasePoolTest {
public:
FlutterViewControllerTest() = default;
~FlutterViewControllerTest() = default;

private:
FML_DISALLOW_COPY_AND_ASSIGN(FlutterViewControllerTest);
};

// MockFlutterEngineTest subclass that exists simply to provide more specific naming.
class FlutterViewControllerMockEngineTest : public MockFlutterEngineTest {
public:
FlutterViewControllerMockEngineTest() = default;
~FlutterViewControllerMockEngineTest() = default;

private:
FML_DISALLOW_COPY_AND_ASSIGN(FlutterViewControllerMockEngineTest);
};
// Test-specific names for AutoreleasePoolTest, MockFlutterEngineTest fixtures.
using FlutterViewControllerTest = AutoreleasePoolTest;
using FlutterViewControllerMockEngineTest = MockFlutterEngineTest;

TEST_F(FlutterViewControllerTest, HasViewThatHidesOtherViewsInAccessibility) {
FlutterViewController* viewControllerMock = CreateMockViewController();
Expand Down