Version: SMASH-3.1
unittest.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2018,2020-2022
3  * SMASH Team
4  */
5 
234 #define TEST(function_name)
235 
243 #define TEST_CATCH(function_name, ExceptionType)
244 
249 #define TEST_TYPES(T, test_name, typelist)
250 
254 #define VERIFY(condition)
255 
259 #define COMPARE(test_value, reference)
260 
269 #define COMPARE_ABSOLUTE_ERROR(test_value, reference, allowed_difference)
270 
288 #define COMPARE_RELATIVE_ERROR(test_value, reference, \
289  allowed_relative_difference)
290 
337 #define FUZZY_COMPARE(test_value, reference)
338 
342 #define FAIL()
343 
344 namespace vir {
345 namespace test {
346 
350 template <class F>
351 inline void expect_assert_failure(F &&f);
352 
371 inline void expect_failure();
372 
373 } // namespace test
374 } // namespace vir
375 
void expect_assert_failure(F &&f)
Pass code that should fail an assertion to this function.
void expect_failure()
Use this to mark that the failure of a following test is expected.
Definition: unittest.h:344