lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] test_mdns.c troubles


From: Gisle Vanem
Subject: Re: [lwip-devel] test_mdns.c troubles
Date: Wed, 19 Dec 2018 18:00:00 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3

goldsimon wrote:

Shouldn't these "Assertion" increment the "Failures:" count?

No. There are tests that check invalid usage. They shouldn't fail.

Okay, fair enough.

But another error after upgrading to latest Check from
  https://github.com/libcheck/check.git

clang-cl reports:

lwip_unittests.c(34,5):  error: too many arguments to function call, expected 
6, have 7
    tcase_add_named_test(tc_core, tests[i]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./api/../lwip_check.h(25,54):  note: expanded from macro 'tcase_add_named_test'
   _tcase_add_test((tc),(tf).func,(tf).name,0, 0, 0, 1)
   ~~~~~~~~~~~~~~~                                   ^
f:/MingW32/src/misc/check/src\check.h(311,12):  note: '_tcase_add_test' 
declared here
CK_DLL_EXP void CK_EXPORT _tcase_add_test(TCase * tc, const TTest * ttest,
           ^

# 311 "f:/MingW32/src/misc/check/src/check.h"
           void _tcase_add_test(TCase * tc, const TTest * ttest,
                                          int _signal, int allowed_exit_value,
                                          int start, int end);

After some pre-processing , I do see there's an argument too much
given to '_tcase_add_test()'.

The prototype from the official check.h:
  void _tcase_add_test(TCase * tc, const TTest * ttest,
                       int _signal, int allowed_exit_value,
                       int start, int end);
(6 args).

and it's use in lwip_unittest.c:
    _tcase_add_test((tc_core),(tests[i]).func,(tests[i]).name,0, 0, 0, 1);

(7 args). How did this happen? And how to solve it?

--
--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]