Skip to content

feat: port test_object test_null to CTS - #79

Open
bavulapati wants to merge 2 commits into
nodejs:mainfrom
bavulapati:feat/port-test-object-null
Open

feat: port test_object test_null to CTS#79
bavulapati wants to merge 2 commits into
nodejs:mainfrom
bavulapati:feat/port-test-object-null

Conversation

@bavulapati

Copy link
Copy Markdown
Contributor

Ports test_null.c/test_null.js - NULL-argument handling across the object property, element and descriptor APIs. Compiled into the test_object addon and exported as testNull, matching the existing test_string pattern.

Two upstream defects surfaced here:

  • Fixed: setElement/getElement called napi_set_property/napi_get_property, so the element cases were not testing the element APIs. Corrected; expectations are unchanged.
  • Kept, with a comment: the utf8nameIsNull and methodIsNull cases mutate the descriptor but still pass a NULL descriptor list, so they re-test descriptorListIsNull. Passing a real descriptor instead segfaults, because napi_define_properties dereferences a descriptor with no name rather than returning napi_invalid_arg. Worth a separate issue on nodejs/node.

Stacked on #73 - review that first.

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

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

1 participant