Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
fixup! test: remove AtExit() addon test
  • Loading branch information
addaleax committed Nov 6, 2019
commit f1015385dd6ac0358c11554c51c11bebdbb42d3e
4 changes: 4 additions & 0 deletions test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ static bool called_cb_1 = false;
static bool called_cb_2 = false;
static bool called_cb_ordered_1 = false;
static bool called_cb_ordered_2 = false;
static bool called_at_exit_js = false;
static void at_exit_callback1(void* arg);
static void at_exit_callback2(void* arg);
static void at_exit_callback_ordered1(void* arg);
Expand Down Expand Up @@ -98,7 +99,9 @@ TEST_F(EnvironmentTest, AtExitRunsJS) {
Env env {handle_scope, argv};

AtExit(*env, at_exit_js, static_cast<void*>(isolate_));
EXPECT_FALSE(called_at_exit_js);
RunAtExit(*env);
EXPECT_TRUE(called_at_exit_js);
}

TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) {
Expand Down Expand Up @@ -180,4 +183,5 @@ static void at_exit_js(void* arg) {
v8::Local<v8::Object> obj = v8::Object::New(isolate);
assert(!obj.IsEmpty()); // Assert VM is still alive.
assert(obj->IsObject());
called_at_exit_js = true;
}
Comment thread
addaleax marked this conversation as resolved.