1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00
denoland-deno/core/libdeno/test.h
Ryan Dahl f7fdb90fd5
core: snapshot improvements (#2052)
* Moves how snapshots are supplied to the Isolate. Previously they were
  given by Behavior::startup_data() but it was only called once at
  startup. It makes more sense (and simplifies Behavior) to pass it to the
  constructor of Isolate.
* Adds new libdeno type deno_snapshot instead of overloading
  deno_buf.
* Adds new libdeno method to delete snapshot deno_snapshot_delete().
* Renames deno_get_snapshot() to deno_snapshot_new().
* Makes StartupData hold references to snapshots. This was implicit when
  it previously held a deno_buf but is made explicit now. Note that
  include_bytes!() returns a &'static [u8] and we want to avoid
  copying that.
2019-04-08 10:12:43 -04:00

12 lines
358 B
C

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
#ifndef TEST_H_
#define TEST_H_
#include "deno.h"
#include "testing/gtest/include/gtest/gtest.h"
extern deno_snapshot snapshot; // Loaded in libdeno/test.cc
const deno_buf empty = {nullptr, 0, nullptr, 0, 0};
const deno_snapshot empty_snapshot = {nullptr, 0};
#endif // TEST_H_