Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::TestIsolateScope Class Reference

#include <unit_test.h>

Public Member Functions

 TestIsolateScope (void *isolate_group_data=nullptr, void *isolate_data=nullptr)
 
 ~TestIsolateScope ()
 
Isolateisolate () const
 

Detailed Description

Definition at line 464 of file unit_test.h.

Constructor & Destructor Documentation

◆ TestIsolateScope()

dart::TestIsolateScope::TestIsolateScope ( void *  isolate_group_data = nullptr,
void *  isolate_data = nullptr 
)
inline

Definition at line 466 of file unit_test.h.

467 {
468 isolate_ = reinterpret_cast<Isolate*>(TestCase::CreateTestIsolate(
469 /*name=*/nullptr, isolate_group_data, isolate_data));
470 Dart_EnterScope(); // Create a Dart API scope for unit tests.
471 }
static Dart_Isolate CreateTestIsolate(const char *name=nullptr, void *isolate_group_data=nullptr, void *isolate_data=nullptr)
Definition unit_test.cc:139
DART_EXPORT void Dart_EnterScope()

◆ ~TestIsolateScope()

dart::TestIsolateScope::~TestIsolateScope ( )
inline

Definition at line 472 of file unit_test.h.

472 {
473 Dart_ExitScope(); // Exit the Dart API scope created for unit tests.
474 ASSERT(isolate_ == Isolate::Current());
476 isolate_ = nullptr;
477 }
static Isolate * Current()
Definition isolate.h:939
#define ASSERT(E)
DART_EXPORT void Dart_ExitScope()
DART_EXPORT void Dart_ShutdownIsolate()

Member Function Documentation

◆ isolate()

Isolate * dart::TestIsolateScope::isolate ( ) const
inline

Definition at line 478 of file unit_test.h.

478{ return isolate_; }

The documentation for this class was generated from the following file: