Skip to content

Add test case for Object Set using uint32 as key - #1130

Merged
JckXia merged 1 commit into
nodejs:mainfrom
meixg:main
Feb 18, 2022
Merged

Add test case for Object Set using uint32 as key#1130
JckXia merged 1 commit into
nodejs:mainfrom
meixg:main

Conversation

@meixg

@meixgmeixg commented Feb 9, 2022

Copy link
Copy Markdown
Member

This PR covered template void Set(uint32_t index, const ValueType& value)
Other testings for Object (#936) may have already been covered:

https://github.com/nodejs/node-addon-api/blob/main/test/object/object.cc#L234:
PropertyLValuestd::string operator [](const char* utf8name)
PropertyLValuestd::string operator [](const std::string& utf8name)
PropertyLValue<uint32_t> operator [](uint32_t index)
Object::PropertyLValue (Uncovered)

https://github.com/nodejs/node-addon-api/blob/main/test/object/has_property.cc#L26:
bool Has(uint32_t index) const

https://github.com/nodejs/node-addon-api/blob/main/test/object/get_property.cc#L18:
Value Get(uint32_t index) const

https://github.com/nodejs/node-addon-api/blob/main/test/object/delete_property.cc#L6:
bool Delete(uint32_t index)

https://github.com/nodejs/node-addon-api/blob/main/test/object/object.cc#L280:
bool InstanceOf(const Function& constructor) const

@JckXiaJckXia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment threadtest/object/set_property.cc
@meixg

Copy link
Copy Markdown
MemberAuthor

My mistake, just modified.
pls have a look. @JckXia

@JckXia

Copy link
Copy Markdown
Member

@meixg The change looks good! Thanks for working on this one. We currently have some issues with our CI but that should hopefully clear up soon.

@JckXia

Copy link
Copy Markdown
Member

@meixg We've made a change to our windows CI that should unblock this PR. Please pull in the latest changes and push again. Thanks!

@NickNasoNickNaso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@meixg

Copy link
Copy Markdown
MemberAuthor

@JckXia CI passed.

@JckXia
JckXia merged commit b7659db into nodejs:mainFeb 18, 2022
@JckXia

Copy link
Copy Markdown
Member

Landed as b7659db

@mhdawson

Copy link
Copy Markdown
Member

Thanks for the contribution. And if you are interested in joining our weekly meetings on Friday at 11ET please feel free to do so.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@meixg@JckXia@mhdawson@NickNaso