diff --git a/libdeno/deno.h b/libdeno/deno.h index e0ba631531..324f09a956 100644 --- a/libdeno/deno.h +++ b/libdeno/deno.h @@ -36,6 +36,9 @@ typedef struct { deno_recv_cb recv_cb; // Maps to libdeno.send() calls. } deno_config; +// Create a new deno isolate. +// Warning: If config.will_snapshot is set, deno_get_snapshot() must be called +// or an error will result. Deno* deno_new(deno_config config); // Generate a snapshot. The resulting buf can be used with deno_new. diff --git a/libdeno/libdeno_test.cc b/libdeno/libdeno_test.cc index 9627f4a8d0..a992f5303a 100644 --- a/libdeno/libdeno_test.cc +++ b/libdeno/libdeno_test.cc @@ -14,11 +14,6 @@ TEST(LibDenoTest, InitializesCorrectlyWithoutSnapshot) { deno_delete(d); } -TEST(LibDenoTest, SnapshotterInitializesCorrectly) { - Deno* d = deno_new(deno_config{1, empty, empty, nullptr}); - deno_delete(d); -} - TEST(LibDenoTest, Snapshotter) { Deno* d1 = deno_new(deno_config{1, empty, empty, nullptr}); EXPECT_TRUE(deno_execute(d1, nullptr, "a.js", "a = 1 + 2"));