Flutter Engine
The Flutter Engine
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 457 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 459 of file unit_test.h.

460 {
461 isolate_ = reinterpret_cast<Isolate*>(TestCase::CreateTestIsolate(
462 /*name=*/nullptr, isolate_group_data, isolate_data));
463 Dart_EnterScope(); // Create a Dart API scope for unit tests.
464 }
static Dart_Isolate CreateTestIsolate(const char *name=nullptr, void *isolate_group_data=nullptr, void *isolate_data=nullptr)
Definition: unit_test.cc:140
DART_EXPORT void Dart_EnterScope()

◆ ~TestIsolateScope()

dart::TestIsolateScope::~TestIsolateScope ( )
inline

Definition at line 465 of file unit_test.h.

465 {
466 Dart_ExitScope(); // Exit the Dart API scope created for unit tests.
467 ASSERT(isolate_ == Isolate::Current());
469 isolate_ = nullptr;
470 }
static Isolate * Current()
Definition: isolate.h:986
#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 471 of file unit_test.h.

471{ return isolate_; }

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