node/test/cctest
Daniel Bevenius 660a97b1d5
test: suppress warning in test_environment.cc
Currently there is a compiler warning generated if a build defines
NDEBUG:

$ env CXXFLAGS='-DNDEBUG' make -j8 cctest
../test/cctest/test_environment.cc:
In function ‘void at_exit_js(void*)’:
../test/cctest/test_environment.cc:333:25: warning:
variable ‘obj’ set but not used [-Wunused-but-set-variable]
  333 |   v8::Local<v8::Object> obj = v8::Object::New(isolate);
      |                         ^~~

NDEBUG is currently not defined using the main branch but this
discovered when working on replacing OpenSSL 1.1.1 with OpenSSL 3.0.

This commit uses EXPECT statements instead of asserts to avoid the
warning.

PR-URL: https://github.com/nodejs/node/pull/38868
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-07-20 07:11:30 -04:00
..
gtest doc: use HEAD instead of master for links 2021-06-11 09:30:19 +02:00
node_test_fixture.cc src: add abstract IsolatePlatformDelegate 2019-11-20 19:02:55 +01:00
node_test_fixture.h src: initialize inspector before RunBootstrapping() 2020-04-14 11:03:29 +01:00
test_aliased_buffer.cc src: ignore GCC -Wcast-function-type for v8.h 2020-04-14 11:04:56 +01:00
test_base_object_ptr.cc src: introduce custom smart pointers for BaseObjects 2019-11-19 13:47:29 +01:00
test_base64.cc src: move all base64.h inline methods into -inl.h header file 2021-05-01 09:39:07 +02:00
test_environment.cc test: suppress warning in test_environment.cc 2021-07-20 07:11:30 -04:00
test_inspector_socket_server.cc inspector: added --inspect-publish-uid 2019-06-03 18:15:04 +03:00
test_inspector_socket.cc src: remove util-inl.h from header files 2019-05-13 13:43:26 -07:00
test_json_utils.cc src: move JSONWriter into its own file 2020-04-07 16:25:13 +01:00
test_linked_binding.cc src: fix multiple AddLinkedBinding() calls 2021-06-14 13:34:10 +02:00
test_node_postmortem_metadata.cc src: expose BaseObject::kInternalFieldCount in post-mortem metadata 2021-05-01 12:25:04 +02:00
test_per_process.cc tools: fix js2c regression 2019-06-02 12:03:40 +02:00
test_platform.cc src: add public APIs to manage v8::TracingController 2020-06-30 09:34:12 -07:00
test_sockaddr.cc src: introduce node_sockaddr 2020-03-05 12:07:34 -08:00
test_traced_value.cc src: apply clang-tidy rule modernize-deprecated-headers 2019-02-27 05:35:53 +01:00
test_url.cc src: fix leading backslash bug in URL 2021-05-01 09:44:50 +02:00
test_util.cc test: update old comment style test_util.cc 2020-12-15 20:15:11 +00:00