[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Remove dangling unit test source file.


On Saturday, 3 December 2016 20:14:18 CET Terje Runde wrote:
> ---

Ups, thanks. I remove the file with your patch.


Thanks,


	Andreas

>  test_ordering_fail.c | 95
> ---------------------------------------------------- 1 file changed, 95
> deletions(-)
>  delete mode 100644 test_ordering_fail.c
> 
> diff --git a/test_ordering_fail.c b/test_ordering_fail.c
> deleted file mode 100644
> index 652f5ad..0000000
> --- a/test_ordering_fail.c
> +++ /dev/null
> @@ -1,95 +0,0 @@
> -#include "config.h"
> -
> -#include <stdarg.h>
> -#include <stddef.h>
> -#include <setjmp.h>
> -#include <cmocka.h>
> -#include <cmocka_private.h>
> -
> -static void mock_test_a_called(void)
> -{
> -    function_called();
> -}
> -
> -static void mock_test_b_called(void)
> -{
> -    function_called();
> -}
> -
> -static void mock_test_c_called(void)
> -{
> -    function_called();
> -}
> -
> -static void test_does_fail_for_unexpected_call(void **state)
> -{
> -    (void)state;
> -    expect_function_call(mock_test_a_called);
> -    expect_function_call(mock_test_a_called);
> -
> -    mock_test_a_called();
> -    mock_test_a_called();
> -    mock_test_a_called();
> -}
> -
> -static void test_does_fail_for_unmade_expected_call(void **state)
> -{
> -    (void)state;
> -    expect_function_call(mock_test_a_called);
> -    expect_function_call(mock_test_a_called);
> -
> -    mock_test_a_called();
> -}
> -
> -static void test_ordering_fails_out_of_order(void **state)
> -{
> -    (void)state;
> -    expect_function_call(mock_test_a_called);
> -    expect_function_call(mock_test_b_called);
> -    expect_function_call(mock_test_a_called);
> -
> -    mock_test_b_called();
> -}
> -
> -static void test_ordering_fails_out_of_order_for_at_least_once_calls(void
> **state) -{
> -    (void)state;
> -    expect_function_call_any(mock_test_a_called);
> -    ignore_function_calls(mock_test_b_called);
> -
> -    mock_test_b_called();
> -    mock_test_c_called();
> -}
> -
> -/* Primarily used to test error message */
> -static void test_fails_out_of_order_if_no_calls_found_on_any(void **state)
> -{
> -    (void)state;
> -    expect_function_call_any(mock_test_a_called);
> -    ignore_function_calls(mock_test_b_called);
> -
> -    mock_test_a_called();
> -    mock_test_c_called();
> -}
> -
> -static void test_fails_if_zero_count_used(void **state)
> -{
> -    (void)state;
> -    expect_function_calls(mock_test_a_called, 0);
> -
> -    mock_test_a_called();
> -}
> -
> -int main(void) {
> -    const struct CMUnitTest tests[] = {
> -        cmocka_unit_test(test_does_fail_for_unexpected_call)
> -        ,cmocka_unit_test(test_does_fail_for_unmade_expected_call)
> -        ,cmocka_unit_test(test_does_fail_for_unmade_expected_call)
> -        ,cmocka_unit_test(test_ordering_fails_out_of_order)
> -       
> ,cmocka_unit_test(test_ordering_fails_out_of_order_for_at_least_once_calls)
> -       
> ,cmocka_unit_test(test_fails_out_of_order_if_no_calls_found_on_any) -      
>  ,cmocka_unit_test(test_fails_if_zero_count_used)
> -    };
> -
> -    return cmocka_run_group_tests(tests, NULL, NULL);
> -}


-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

References:
[PATCH] Remove dangling unit test source file.Terje Runde <terje.runde@xxxxxxxxx>