Skip to content

Commit

Permalink
tests: adapt for v8 8.9
Browse files Browse the repository at this point in the history
V8 API for ScriptOrigin constructor has changed. Adapt test to compile
with v8 8.9.

Currently only `ScriptOrigin` instances are consumed by NAN therefore
no adaptions in the NAN API are needed to keep build/tests working.
  • Loading branch information
Flarna committed Apr 26, 2021
1 parent 7c3fc68 commit 303d964
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/cpp/nannew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ NAN_METHOD(testScript) {

t.plan(6);

#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \
(V8_MAJOR_VERSION == 8 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 9))
ScriptOrigin origin(New("foo").ToLocalChecked(), 5);
#else
ScriptOrigin origin(New("foo").ToLocalChecked(), New(5));
#endif

t.ok(_( assertType<Script>(New<Script>(
New("2 + 3").ToLocalChecked()).ToLocalChecked())));
Expand Down

0 comments on commit 303d964

Please sign in to comment.