Sha256: ddee0e4d0ee2504ab95172c9fb3b1525059255af83d51b9e11273f94316dd1d4

Contents?: true

Size: 1.11 KB

Versions: 12

Compression:

Stored size: 1.11 KB

Contents

#ifndef fff_unity_helper_H
#define fff_unity_helper_H

/*
    FFF helper macros for Unity.
*/

/*
    Fail if the function was not called the expected number of times.
*/
#define TEST_ASSERT_CALLED_TIMES(times_, function_)                         \
    TEST_ASSERT_EQUAL_MESSAGE(times_,                                       \
        function_ ## _fake.call_count,                                      \
        "Function " #function_ " called the incorrect number of times.")
/*
    Fail if the function was not called exactly once.
*/
#define TEST_ASSERT_CALLED(function_) TEST_ASSERT_CALLED_TIMES(1, function_)

/*
    Fail if the function was called 1 or more times.
*/
#define TEST_ASSERT_NOT_CALLED(function_) TEST_ASSERT_CALLED_TIMES(0, function_)

/*
    Fail if the function was not called in this particular order.
*/
#define TEST_ASSERT_CALLED_IN_ORDER(order_, function_)                      \
    TEST_ASSERT_EQUAL_PTR_MESSAGE((void *) function_,                       \
        fff.call_history[order_],                                           \
        "Function " #function_ " not called in order " #order_ )

#endif

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ceedling-1.0.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.31.1 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.31.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.30.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.28.3 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.28.2 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.28.1 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.27.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.25.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.24.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.22.0 plugins/fake_function_framework/src/fff_unity_helper.h
ceedling-0.21.0 plugins/fake_function_framework/src/fff_unity_helper.h