Versions of gtest macros that run tests in a coroutine environment and other helpers.
There are the following extensions:
_MT
("multi-threaded") macro versions take 'thread_count' integer as the 3rd parameter at the test definition. It specifies the number of worker threads that should be created for the test. By default, there is only 1 worker thread, which should be enough for most tests;GetThreadCount()
method is available in the test scope.See Unit Tests and Benchmarks for more usage examples and descriptions
Classes | |
struct | utest::PrintTestName |
Test name printer for parameterized tests written in gtest. More... | |
class | utest::SimpleServer |
struct | kafka::utest::Message |
Message owning data wrapper for unit tests. More... | |
class | kafka::utest::KafkaCluster |
Helper for Kafka unit testing. More... | |
Macros | |
#define | UTEST(test_suite_name, test_name) |
An equivalent of the gtest macro TEST that starts the test body as a coroutine task. | |
#define | UTEST_DEATH(test_suite_name, test_name) |
An equivalent of the gtest macro TEST for death tests that starts the test body as a coroutine task. | |
#define | UTEST_MT(test_suite_name, test_name, thread_count) |
An equivalent of the gtest macro TEST that starts the test body as a coroutine task. | |
#define | UTEST_F(test_suite_name, test_name) |
An equivalent of the gtest macro TEST_F that starts the test body as a coroutine task. | |
#define | UTEST_F_DEATH(test_suite_name, test_name) |
An equivalent of the gtest macro TEST_F for death tests that starts the test body as a coroutine task. | |
#define | UTEST_F_MT(test_suite_name, test_name, thread_count) |
An equivalent of the gtest macro TEST_F that starts the test body as a coroutine task. | |
#define | UTEST_P(test_suite_name, test_name) |
An equivalent of the gtest macro TEST_P that starts the test body as a coroutine task. | |
#define | UTEST_P_MT(test_suite_name, test_name, thread_count) |
An equivalent of the gtest macro TEST_P that starts the test body as a coroutine task. | |
#define | TYPED_UTEST(test_suite_name, test_name) |
An equivalent of the gtest macro TYPED_TEST that starts the test body as a coroutine task. | |
#define | TYPED_UTEST_MT(test_suite_name, test_name, thread_count) |
An equivalent of the gtest macro TYPED_TEST that starts the test body as a coroutine task. | |
#define | TYPED_UTEST_P(test_suite_name, test_name) |
An equivalent of the gtest macro TYPED_TEST_P that starts the test body as a coroutine task. | |
#define | TYPED_UTEST_P_MT(test_suite_name, test_name, thread_count) |
An equivalent of the gtest macro TYPED_TEST_P that starts the test body as a coroutine task. | |
#define | TYPED_UTEST_SUITE(test_suite_name, types) |
An equivalent of the gtest macro TYPED_TEST_SUITE that starts the test body as a coroutine task. | |
#define | INSTANTIATE_UTEST_SUITE_P(prefix, test_suite_name, ...) |
An equivalent of the gtest macro INSTANTIATE_TEST_SUITE_P that starts the test body as a coroutine task. | |
#define | REGISTER_TYPED_UTEST_SUITE_P(test_suite_name, ...) |
An equivalent of the gtest macro REGISTER_TYPED_TEST_SUITE_P that starts the test body as a coroutine task. | |
#define | INSTANTIATE_TYPED_UTEST_SUITE_P(prefix, test_suite_name, types) |
An equivalent of the gtest macro INSTANTIATE_TYPED_TEST_SUITE_P that starts the test body as a coroutine task. | |
#define | TYPED_UTEST_SUITE_P(test_suite_name) |
An equivalent of the gtest macro TYPED_TEST_SUITE_P that starts the test body as a coroutine task. | |
#define | UEXPECT_THROW_MSG(statement, exception_type, message_substring) |
#define | UASSERT_THROW_MSG(statement, exception_type, message_substring) |
#define | UEXPECT_THROW(statement, exception_type) |
#define | UASSERT_THROW(statement, exception_type) |
#define | UEXPECT_NO_THROW(statement) |
#define | UASSERT_NO_THROW(statement) |
#define | EXPECT_UINVARIANT_FAILURE(statement) |
#define | UEXPECT_DEATH(statement, message) |
An optimized equivalent of EXPECT_DEATH. | |
#define EXPECT_UINVARIANT_FAILURE | ( | statement | ) |
Test that a UINVARIANT check triggers
Definition at line 142 of file assert_macros.hpp.
#define INSTANTIATE_TYPED_UTEST_SUITE_P | ( | prefix, | |
test_suite_name, | |||
types ) |
#define INSTANTIATE_UTEST_SUITE_P | ( | prefix, | |
test_suite_name, | |||
... ) |
#define REGISTER_TYPED_UTEST_SUITE_P | ( | test_suite_name, | |
... ) |
#define TYPED_UTEST | ( | test_suite_name, | |
test_name ) |
#define TYPED_UTEST_MT | ( | test_suite_name, | |
test_name, | |||
thread_count ) |
#define TYPED_UTEST_P | ( | test_suite_name, | |
test_name ) |
#define TYPED_UTEST_P_MT | ( | test_suite_name, | |
test_name, | |||
thread_count ) |
#define TYPED_UTEST_SUITE | ( | test_suite_name, | |
types ) |
#define TYPED_UTEST_SUITE_P | ( | test_suite_name | ) |
#define UASSERT_NO_THROW | ( | statement | ) |
An equivalent to EXPECT_THROW
with better diagnostics
Definition at line 123 of file assert_macros.hpp.
#define UASSERT_THROW | ( | statement, | |
exception_type ) |
An equivalent to ASSERT_THROW
with better diagnostics
Definition at line 106 of file assert_macros.hpp.
#define UASSERT_THROW_MSG | ( | statement, | |
exception_type, | |||
message_substring ) |
An equivalent to ASSERT_THROW
with an additional check for a message substring
Definition at line 88 of file assert_macros.hpp.
#define UEXPECT_DEATH | ( | statement, | |
message ) |
An optimized equivalent of EXPECT_DEATH.
Definition at line 39 of file death_tests.hpp.
#define UEXPECT_NO_THROW | ( | statement | ) |
An equivalent to EXPECT_NO_THROW
with better diagnostics
Definition at line 115 of file assert_macros.hpp.
#define UEXPECT_THROW | ( | statement, | |
exception_type ) |
An equivalent to EXPECT_THROW
with better diagnostics
Definition at line 97 of file assert_macros.hpp.
#define UEXPECT_THROW_MSG | ( | statement, | |
exception_type, | |||
message_substring ) |
An equivalent to EXPECT_THROW
with an additional check for a message substring
Definition at line 78 of file assert_macros.hpp.
#define UTEST | ( | test_suite_name, | |
test_name ) |
An equivalent of the gtest macro TEST that starts the test body as a coroutine task.
#define UTEST_DEATH | ( | test_suite_name, | |
test_name ) |
#define UTEST_F | ( | test_suite_name, | |
test_name ) |
An equivalent of the gtest macro TEST_F that starts the test body as a coroutine task.
#define UTEST_F_DEATH | ( | test_suite_name, | |
test_name ) |
#define UTEST_F_MT | ( | test_suite_name, | |
test_name, | |||
thread_count ) |
#define UTEST_MT | ( | test_suite_name, | |
test_name, | |||
thread_count ) |
#define UTEST_P | ( | test_suite_name, | |
test_name ) |