<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/test/node-api/test_callback_scope/binding.c, branch main</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>test: rename n-api to node-api</title>
<updated>2021-02-06T13:03:38+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2021-02-03T20:01:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=4b7f23f8689966c50c7b985537a57cf4d8a72fef'/>
<id>4b7f23f8689966c50c7b985537a57cf4d8a72fef</id>
<content type='text'>
This renames the macros used in the tests from `NAPI_*` to
`NODE_API_*`.

PR-URL: https://github.com/nodejs/node/pull/37217
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Beth Griggs &lt;bgriggs@redhat.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This renames the macros used in the tests from `NAPI_*` to
`NODE_API_*`.

PR-URL: https://github.com/nodejs/node/pull/37217
Reviewed-By: Michael Dawson &lt;midawson@redhat.com&gt;
Reviewed-By: Beth Griggs &lt;bgriggs@redhat.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: convert most N-API tests from C++ to C</title>
<updated>2020-08-05T21:21:51+00:00</updated>
<author>
<name>Gabriel Schulhof</name>
<email>gabriel.schulhof@intel.com</email>
</author>
<published>2020-08-03T19:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=734327280daeb0f358a89651b119283631bf7211'/>
<id>734327280daeb0f358a89651b119283631bf7211</id>
<content type='text'>
* Prefix functions with `static` to make them local
* Remove anonymous namespaces
* `nullptr` -&gt; `NULL`
* .cc -&gt; .c and update binding.gyp
* `static_cast&lt;x&gt;()` -&gt; `(x)()`
* Replace `new`/`delete` with `malloc()`/`free()`
  (only in test_callback_scope)
* Move lambda out and convert to local function
  (only in test_callback_scope)
* Remove superfluous `#include &lt;vector&gt;`
  (only in test_callback_scope_recurse)

Some tests are best left as C++.

```bash
ls -l test/{node-api,js-native-api}/*/*.cc
```

for those remaining as C++ tests.

Signed-off-by: Gabriel Schulhof &lt;gabriel.schulhof@intel.com&gt;
PR-URL: https://github.com/nodejs/node/pull/34615
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Gerhard Stöbich &lt;deb2001-github@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Prefix functions with `static` to make them local
* Remove anonymous namespaces
* `nullptr` -&gt; `NULL`
* .cc -&gt; .c and update binding.gyp
* `static_cast&lt;x&gt;()` -&gt; `(x)()`
* Replace `new`/`delete` with `malloc()`/`free()`
  (only in test_callback_scope)
* Move lambda out and convert to local function
  (only in test_callback_scope)
* Remove superfluous `#include &lt;vector&gt;`
  (only in test_callback_scope_recurse)

Some tests are best left as C++.

```bash
ls -l test/{node-api,js-native-api}/*/*.cc
```

for those remaining as C++ tests.

Signed-off-by: Gabriel Schulhof &lt;gabriel.schulhof@intel.com&gt;
PR-URL: https://github.com/nodejs/node/pull/34615
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Gerhard Stöbich &lt;deb2001-github@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
