Skip to content
Features

Features

API

These frameworks were designed as subset replacements for Googletest. The assertion names are shared by C11 and C++11; C generic comparisons accept scalar values, while C++ also accepts types that provide the corresponding operator.

C

The utest column refers to sheredom/utest.h.

Macro or capabilityjc_test Cutest.h
ASSERT_EQ/NE/LT/GT/LE/GEYesYes
ASSERT_ARRAY_EQ / ASSERT_ARRAY_EQ_LENYesASSERT_MEMEQ
ASSERT_STREQ / ASSERT_STRNEYesYes
ASSERT_NEARYesYes
ASSERT_DEATHYesNo
ASSERT_TRUE / ASSERT_FALSEYesYes
EXPECT_* variantsYesYes
Skip current testSKIPUTEST_SKIP
Basic testsTESTUTEST
FixturesTEST_FUTEST_F
Parameterized testsNoNo
Typed testsNoNo

C++

Macro or capabilityjc_test C++GoogleTest
ASSERT_EQ/NE/LT/GT/LE/GEYesYes
ASSERT_ARRAY_EQ / ASSERT_ARRAY_EQ_LENYesNo
ASSERT_STREQ / ASSERT_STRNEYesYes
ASSERT_NEARYesYes
ASSERT_DEATHYesYes
ASSERT_TRUE / ASSERT_FALSEYesYes
EXPECT_* variantsYesYes
Skip current testSKIPGTEST_SKIP
TESTYesYes
TEST_FYesYes
TEST_PYesYes
TYPED_TEST**YesYes

ASSERT_FLOAT_EQ and ASSERT_DOUBLE_EQ are represented by ASSERT_EQ, with a margin of 4 ULP.

**) A maximum number of 4 test types per typed test

Other frameworks

See Benchmarks for same-language C and C++ comparisons and reproduction instructions. C and C++ frameworks are kept in separate tables because their compiler and runtime results are not directly comparable.

Last updated on