Browse Source

tests/common: use CJSON_PUBLIC

pull/125/head
Max Bruckner 8 years ago
parent
commit
b44c917be9
  1. 4
      tests/common.c
  2. 4
      tests/common.h

4
tests/common.c

@ -22,7 +22,7 @@
#include "common.h" #include "common.h"
extern void reset(cJSON *item) CJSON_PUBLIC(void) reset(cJSON *item)
{ {
if ((item != NULL) && (item->child != NULL)) if ((item != NULL) && (item->child != NULL))
{ {
@ -40,7 +40,7 @@ extern void reset(cJSON *item)
memset(item, 0, sizeof(cJSON)); memset(item, 0, sizeof(cJSON));
} }
extern char *read_file(const char *filename) CJSON_PUBLIC(char*) read_file(const char *filename)
{ {
FILE *file = NULL; FILE *file = NULL;
long length = 0; long length = 0;

4
tests/common.h

@ -25,8 +25,8 @@
#include "../cJSON.c" #include "../cJSON.c"
extern void reset(cJSON *item); CJSON_PUBLIC(void) reset(cJSON *item);
extern char *read_file(const char *filename); CJSON_PUBLIC(char*) read_file(const char *filename);
/* assertion helper macros */ /* assertion helper macros */
#define assert_has_type(item, item_type) TEST_ASSERT_BITS_MESSAGE(0xFF, item_type, item->type, "Item doesn't have expected type.") #define assert_has_type(item, item_type) TEST_ASSERT_BITS_MESSAGE(0xFF, item_type, item->type, "Item doesn't have expected type.")

Loading…
Cancel
Save