Decision: do not use <absl/synchronization/*>
. On Fuchsia, these classes bottom out in pthread_mutex_t
and pthread_cond_t
, which are not the most efficient primitives on Fuchsia. When ABSL_INTERNAL_USE_NONPROD_MUTEX
is defined, these primitives bottom out in something much more sophisticated. Instead, please use <lib/sync/*.h>
, which bottoms out in optimal synchronization primitives on Fuchsia.
Use the Gtest framework for writing tests everywhere except the Zircon directory. It provides the TEST
and TEST_F
macros as well as the ASSERT
and EXPECT
variants we use.
Inside the Zircon directory, use system/ulib/zxtest
instead. It provides a Gtest-like interface with fewer dependencies on higher-level OS concepts like mutexes (things we want to test). It also supports writing tests in C which is required for some layers.
Gmock has several components. We allow the gmock matchers such as ElementsAre()
.
There are varying opinions on the team on the function mocking functions (MOCK_METHOD
and EXPECT_CALL
).
Pros:
Cons:
Decision: do not use the mocking functionality of gmock (MOCK_METHOD
and EXPECT_CALL
).