2018-07-23 14:46:30 -04:00
|
|
|
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
2018-10-23 19:39:31 -04:00
|
|
|
#include "test.h"
|
|
|
|
#include "file_util.h"
|
|
|
|
|
|
|
|
deno_buf snapshot = {nullptr, 0, nullptr, 0};
|
2018-07-12 13:41:19 -04:00
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
2018-10-23 19:39:31 -04:00
|
|
|
// Load the snapshot.
|
|
|
|
std::string contents;
|
|
|
|
if (!deno::ReadFileToString(SNAPSHOT_PATH, &contents)) {
|
|
|
|
printf("Failed to read file %s\n", SNAPSHOT_PATH);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
snapshot.data_ptr =
|
|
|
|
reinterpret_cast<uint8_t*>(const_cast<char*>(contents.c_str()));
|
|
|
|
snapshot.data_len = contents.size();
|
|
|
|
|
2018-07-12 13:41:19 -04:00
|
|
|
testing::InitGoogleTest(&argc, argv);
|
|
|
|
deno_init();
|
2018-09-22 20:47:44 +08:00
|
|
|
deno_set_v8_flags(&argc, argv);
|
2018-07-12 13:41:19 -04:00
|
|
|
return RUN_ALL_TESTS();
|
|
|
|
}
|