diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-06-20 10:46:38 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-06-29 13:49:35 +0200 |
commit | 3c85f4e23754b87fe0bf72eda3f097d0e6274222 (patch) | |
tree | ea34bb4821acb1579e436f9c4780efd090feef32 /test/addons/make-callback | |
parent | 0672fca921e3ace9f10309c58ead71fa31750e39 (diff) | |
download | android-node-v8-3c85f4e23754b87fe0bf72eda3f097d0e6274222.tar.gz android-node-v8-3c85f4e23754b87fe0bf72eda3f097d0e6274222.tar.bz2 android-node-v8-3c85f4e23754b87fe0bf72eda3f097d0e6274222.zip |
test: don't use internal headers in add-on tests
There is no real need and it causes endless grief on Windows with some
of the upcoming changes.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/addons/make-callback')
-rw-r--r-- | test/addons/make-callback/binding.cc | 9 | ||||
-rw-r--r-- | test/addons/make-callback/binding.gyp | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/test/addons/make-callback/binding.cc b/test/addons/make-callback/binding.cc index a1adb997bb..8970e9fb1a 100644 --- a/test/addons/make-callback/binding.cc +++ b/test/addons/make-callback/binding.cc @@ -1,15 +1,14 @@ #include "node.h" #include "v8.h" -#include "../../../src/util.h" - +#include <assert.h> #include <vector> namespace { void MakeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { - CHECK(args[0]->IsObject()); - CHECK(args[1]->IsFunction() || args[1]->IsString()); + assert(args[0]->IsObject()); + assert(args[1]->IsFunction() || args[1]->IsString()); auto isolate = args.GetIsolate(); auto recv = args[0].As<v8::Object>(); std::vector<v8::Local<v8::Value>> argv; @@ -26,7 +25,7 @@ void MakeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { result = node::MakeCallback(isolate, recv, method, argv.size(), argv.data()); } else { - UNREACHABLE(); + assert(0 && "unreachable"); } args.GetReturnValue().Set(result); } diff --git a/test/addons/make-callback/binding.gyp b/test/addons/make-callback/binding.gyp index 50d094746c..7ede63d94a 100644 --- a/test/addons/make-callback/binding.gyp +++ b/test/addons/make-callback/binding.gyp @@ -2,10 +2,7 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ - 'NODE_WANT_INTERNALS=1', - 'V8_DEPRECATION_WARNINGS=1', - ], + 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], 'sources': [ 'binding.cc' ] } ] |