In Command Windows, there is an error! please see below!

In file included from lwIP/test/unit/lwip_unittests.c:1:0:
lwIP/test/unit/lwip_check.h:7:19: fatal error: check.h: No such file or directory
compilation terminated.
make: *** [obj/lwIP/test/unit/lwip_unittests.o] Error 1

I am using an Sourcery_2011_09_ARM_EABI. But in this files there isn't header file names check.h

In the file lwip_unittests.c:

#ifndef __LWIP_CHECK_H__
#define __LWIP_CHECK_H__

/* Common header file for lwIP unit tests using the check framework */

#include <sys/config.h>
#include <check.h>
#include <stdlib.h>

#define FAIL_RET() do { fail(); return; } while(0)
#define EXPECT(x) fail_unless(x)
#define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0)
#define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0)
#define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL)

/** typedef for a function returning a test suite */
typedef Suite* (suite_getter_fn)(void);

/** Create a test suite */
static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown)
{
  size_t i;
  Suite *s = suite_create(name);

  for(i = 0; i < num_tests; i++) {
    /* Core test case */
    TCase *tc_core = tcase_create("Core");
    if ((setup != NULL) || (teardown != NULL)) {
      tcase_add_checked_fixture(tc_core, setup, teardown);
    }
    tcase_add_test(tc_core, tests[i]);
    suite_add_tcase(s, tc_core);
  }
  return s;
}

#endif /* __LWIP_CHECK_H__ */

I need a file check.h, where can i get this?

And if check.h will be implemented in the file Sourcery_2011_09_ARM_EABI, will it work?

Or do i need to change check.h to tree-check.h or something other named, that is implement in the Sourcery_2011_09_ARM_EABI?

有帮助吗?

解决方案

You'll probably need to install the check unit testing framework: http://check.sourceforge.net/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top