Skip to content

Commit

Permalink
unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Rajamohan committed Sep 11, 2021
1 parent 1af255c commit e74bb96
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 226 deletions.
78 changes: 0 additions & 78 deletions napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@ inline Object::PropertyLValue<uint32_t> Object::operator [](uint32_t index) {
return PropertyLValue<uint32_t>(*this, index);
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Object::operator[](const char* utf8name) const {
return Get(utf8name);
}
Expand All @@ -1316,17 +1315,6 @@ inline MaybeOrValue<Value> Object::operator[](
}

inline MaybeOrValue<Value> Object::operator[](uint32_t index) const {
=======
inline Value Object::operator[](const char* utf8name) const {
return Get(utf8name);
}

inline Value Object::operator[](const std::string& utf8name) const {
return Get(utf8name);
}

inline Value Object::operator[](uint32_t index) const {
>>>>>>> 637e422... run tests with options to prefix build root path
return Get(index);
}

Expand Down Expand Up @@ -2196,20 +2184,12 @@ inline Function::Function() : Object() {
inline Function::Function(napi_env env, napi_value value) : Object(env, value) {
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Function::operator()(
=======
inline Value Function::operator()(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
return Call(Env().Undefined(), args);
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Function::Call(
=======
inline Value Function::Call(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
return Call(Env().Undefined(), args);
}
Expand All @@ -2224,16 +2204,11 @@ inline MaybeOrValue<Value> Function::Call(size_t argc,
return Call(Env().Undefined(), argc, args);
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Function::Call(
=======
inline Value Function::Call(
>>>>>>> 637e422... run tests with options to prefix build root path
napi_value recv, const std::initializer_list<napi_value>& args) const {
return Call(recv, args.size(), args.begin());
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Function::Call(
napi_value recv, const std::vector<napi_value>& args) const {
return Call(recv, args.size(), args.data());
Expand All @@ -2242,16 +2217,6 @@ inline MaybeOrValue<Value> Function::Call(
inline MaybeOrValue<Value> Function::Call(napi_value recv,
size_t argc,
const napi_value* args) const {
=======
inline Value Function::Call(napi_value recv,
const std::vector<napi_value>& args) const {
return Call(recv, args.size(), args.data());
}

inline Value Function::Call(napi_value recv,
size_t argc,
const napi_value* args) const {
>>>>>>> 637e422... run tests with options to prefix build root path
napi_value result;
napi_status status = napi_call_function(
_env, recv, _value, argc, args, &result);
Expand All @@ -2266,7 +2231,6 @@ inline MaybeOrValue<Value> Function::MakeCallback(
return MakeCallback(recv, args.size(), args.begin(), context);
}

<<<<<<< HEAD
inline MaybeOrValue<Value> Function::MakeCallback(
napi_value recv,
const std::vector<napi_value>& args,
Expand All @@ -2279,30 +2243,14 @@ inline MaybeOrValue<Value> Function::MakeCallback(
size_t argc,
const napi_value* args,
napi_async_context context) const {
=======
inline Value Function::MakeCallback(napi_value recv,
const std::vector<napi_value>& args,
napi_async_context context) const {
return MakeCallback(recv, args.size(), args.data(), context);
}

inline Value Function::MakeCallback(napi_value recv,
size_t argc,
const napi_value* args,
napi_async_context context) const {
>>>>>>> 637e422... run tests with options to prefix build root path
napi_value result;
napi_status status = napi_make_callback(
_env, context, recv, _value, argc, args, &result);
NAPI_RETURN_OR_THROW_IF_FAILED(
_env, status, Napi::Value(_env, result), Napi::Value);
}

<<<<<<< HEAD
inline MaybeOrValue<Object> Function::New(
=======
inline Object Function::New(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
return New(args.size(), args.begin());
}
Expand Down Expand Up @@ -3088,11 +3036,7 @@ inline FunctionReference& FunctionReference::operator =(FunctionReference&& othe
return *this;
}

<<<<<<< HEAD
inline MaybeOrValue<Napi::Value> FunctionReference::operator()(
=======
inline Napi::Value FunctionReference::operator()(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
EscapableHandleScope scope(_env);
MaybeOrValue<Napi::Value> result = Value()(args);
Expand All @@ -3109,11 +3053,7 @@ inline Napi::Value FunctionReference::operator()(
#endif
}

<<<<<<< HEAD
inline MaybeOrValue<Napi::Value> FunctionReference::Call(
=======
inline Napi::Value FunctionReference::Call(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
EscapableHandleScope scope(_env);
MaybeOrValue<Napi::Value> result = Value().Call(args);
Expand All @@ -3130,11 +3070,7 @@ inline Napi::Value FunctionReference::Call(
#endif
}

<<<<<<< HEAD
inline MaybeOrValue<Napi::Value> FunctionReference::Call(
=======
inline Napi::Value FunctionReference::Call(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::vector<napi_value>& args) const {
EscapableHandleScope scope(_env);
MaybeOrValue<Napi::Value> result = Value().Call(args);
Expand Down Expand Up @@ -3185,14 +3121,8 @@ inline MaybeOrValue<Napi::Value> FunctionReference::Call(
#endif
}

<<<<<<< HEAD
inline MaybeOrValue<Napi::Value> FunctionReference::Call(
napi_value recv, size_t argc, const napi_value* args) const {
=======
inline Napi::Value FunctionReference::Call(napi_value recv,
size_t argc,
const napi_value* args) const {
>>>>>>> 637e422... run tests with options to prefix build root path
EscapableHandleScope scope(_env);
MaybeOrValue<Napi::Value> result = Value().Call(recv, argc, args);
#ifdef NODE_ADDON_API_ENABLE_MAYBE
Expand Down Expand Up @@ -3268,11 +3198,7 @@ inline MaybeOrValue<Napi::Value> FunctionReference::MakeCallback(
#endif
}

<<<<<<< HEAD
inline MaybeOrValue<Object> FunctionReference::New(
=======
inline Object FunctionReference::New(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::initializer_list<napi_value>& args) const {
EscapableHandleScope scope(_env);
MaybeOrValue<Object> result = Value().New(args);
Expand All @@ -3289,11 +3215,7 @@ inline Object FunctionReference::New(
#endif
}

<<<<<<< HEAD
inline MaybeOrValue<Object> FunctionReference::New(
=======
inline Object FunctionReference::New(
>>>>>>> 637e422... run tests with options to prefix build root path
const std::vector<napi_value>& args) const {
EscapableHandleScope scope(_env);
MaybeOrValue<Object> result = Value().New(args);
Expand Down
Loading

0 comments on commit e74bb96

Please sign in to comment.