Skip to content

Commit

Permalink
build: fix test suite after changes to json.h
Browse files Browse the repository at this point in the history
Since json.h after commit 25daae3 no
longer includes the private headers, make the test suite include the
individual headers as needed.
An alternative would be to create a "json_internal.h", which the tests
can include and which reference all internal headers.
  • Loading branch information
mbiebl committed Apr 7, 2016
1 parent 25daae3 commit 6fafb53
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/parse_flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "../json.h"
#include "parse_flags.h"
Expand Down
2 changes: 2 additions & 0 deletions tests/test1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <assert.h>

#include "../json.h"
#include "../debug.h"
#include "../linkhash.h"
#include "parse_flags.h"

static int sort_fn (const void *j1, const void *j2)
Expand Down
1 change: 1 addition & 0 deletions tests/test2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string.h>

#include "../json.h"
#include "../debug.h"
#include "parse_flags.h"

#ifdef TEST_FORMATTED
Expand Down
2 changes: 2 additions & 0 deletions tests/testReplaceExisting.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <string.h>

#include "../json.h"
#include "../debug.h"
#include "../linkhash.h"

int main(int __attribute__((unused)) argc, char __attribute__((unused)) **argv)
{
Expand Down
1 change: 1 addition & 0 deletions tests/test_charcase.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "../json.h"
#include "../json_tokener.h"
#include "../debug.h"

static void test_case_parse(void);

Expand Down
1 change: 1 addition & 0 deletions tests/test_locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "../json.h"
#include "../json_tokener.h"
#include "../debug.h"

#ifdef HAVE_LOCALE_H
#include <locale.h>
Expand Down
1 change: 1 addition & 0 deletions tests/test_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "../json.h"
#include "../json_tokener.h"
#include "../debug.h"

static void test_basic_parse(void);
static void test_verbose_parse(void);
Expand Down
1 change: 1 addition & 0 deletions tests/test_set_serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "../json.h"
#include "../printbuf.h"
#include "../debug.h"

struct myinfo {
int value;
Expand Down

0 comments on commit 6fafb53

Please sign in to comment.