diff options
Diffstat (limited to 'test/cctest')
-rw-r--r-- | test/cctest/test_environment.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index c559a21fda..07170ac267 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -33,6 +33,16 @@ TEST_F(EnvironmentTest, AtExitWithEnvironment) { EXPECT_TRUE(called_cb_1); } +TEST_F(EnvironmentTest, AtExitWithoutEnvironment) { + const v8::HandleScope handle_scope(isolate_); + const Argv argv; + Env env {handle_scope, argv}; + + AtExit(at_exit_callback1); // No Environment is passed to AtExit. + RunAtExit(*env); + EXPECT_TRUE(called_cb_1); +} + TEST_F(EnvironmentTest, AtExitWithArgument) { const v8::HandleScope handle_scope(isolate_); const Argv argv; |