Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
autoreleasepool_test.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
#ifndef FLUTTER_TESTING_AUTORELEASEPOOL_TEST_H_
6
#define FLUTTER_TESTING_AUTORELEASEPOOL_TEST_H_
7
8
#include "
flutter/fml/platform/darwin/scoped_nsautorelease_pool.h
"
9
10
#include "gtest/gtest.h"
11
12
namespace
flutter::testing
{
13
14
// GoogleTest mixin that runs the test within the scope of an NSAutoReleasePool.
15
//
16
// This can be mixed into test fixture classes that also inherit from gtest's
17
// ::testing::Test base class.
18
class
AutoreleasePoolTestMixin
{
19
public
:
20
AutoreleasePoolTestMixin
() =
default
;
21
~AutoreleasePoolTestMixin
() =
default
;
22
23
private
:
24
fml::ScopedNSAutoreleasePool
autorelease_pool_;
25
26
FML_DISALLOW_COPY_AND_ASSIGN
(
AutoreleasePoolTestMixin
);
27
};
28
29
// GoogleTest fixture that runs the test within the scope of an
30
// NSAutoReleasePool.
31
class
AutoreleasePoolTest
:
public
::testing::Test,
32
public
AutoreleasePoolTestMixin
{
33
public
:
34
AutoreleasePoolTest
() =
default
;
35
~AutoreleasePoolTest
() =
default
;
36
37
private
:
38
fml::ScopedNSAutoreleasePool
autorelease_pool_;
39
40
FML_DISALLOW_COPY_AND_ASSIGN
(
AutoreleasePoolTest
);
41
};
42
43
}
// namespace flutter::testing
44
45
#endif
// FLUTTER_TESTING_AUTORELEASEPOOL_TEST_H_
flutter::testing::AutoreleasePoolTest
Definition
autoreleasepool_test.h:32
flutter::testing::AutoreleasePoolTest::~AutoreleasePoolTest
~AutoreleasePoolTest()=default
flutter::testing::AutoreleasePoolTest::AutoreleasePoolTest
AutoreleasePoolTest()=default
flutter::testing::AutoreleasePoolTestMixin
Definition
autoreleasepool_test.h:18
flutter::testing::AutoreleasePoolTestMixin::AutoreleasePoolTestMixin
AutoreleasePoolTestMixin()=default
flutter::testing::AutoreleasePoolTestMixin::~AutoreleasePoolTestMixin
~AutoreleasePoolTestMixin()=default
fml::ScopedNSAutoreleasePool
Definition
scoped_nsautorelease_pool.h:13
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter::testing
Definition
native_assets_unittests.cc:10
scoped_nsautorelease_pool.h
testing
autoreleasepool_test.h
Generated on Tue Dec 2 2025 04:46:44 for Flutter Engine Uber Docs by
1.9.8