[recipes] Link tests against librecipes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Link tests against librecipes
- Date: Fri, 14 Jul 2017 01:04:43 +0000 (UTC)
commit 43fb55215859a4bfa8a063c0e1a590cd10f4b89c
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 13 21:03:53 2017 -0400
Link tests against librecipes
This is much cleaner than the include hack we used before.
tests/ids.c | 1 -
tests/meson.build | 4 ++++
tests/number.c | 3 +--
tests/strv.c | 1 -
tests/unit.c | 3 +--
5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/tests/ids.c b/tests/ids.c
index 7899cb7..19409a6 100644
--- a/tests/ids.c
+++ b/tests/ids.c
@@ -22,7 +22,6 @@
#include <string.h>
#include <glib.h>
#include "gr-utils.h"
-#include "gr-utils.c"
static GString *string;
diff --git a/tests/meson.build b/tests/meson.build
index e278ea6..adda7be 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -14,20 +14,24 @@ test('ingredients', ingredients, env : env)
number = executable('number', 'number.c',
include_directories : tests_inc,
+ link_with: librecipes,
dependencies: deps)
test('number', number, env : env)
unit = executable('unit', 'unit.c',
include_directories : tests_inc,
+ link_with: librecipes,
dependencies: deps)
test('unit', unit, env : env)
ids = executable('ids', 'ids.c',
include_directories : tests_inc,
+ link_with: librecipes,
dependencies: deps)
test('ids', ids, env : env)
strv = executable('strv', 'strv.c',
include_directories : tests_inc,
+ link_with: librecipes,
dependencies: deps)
test('strv', strv, env : env)
diff --git a/tests/number.c b/tests/number.c
index 445873d..0b1baf0 100644
--- a/tests/number.c
+++ b/tests/number.c
@@ -21,10 +21,9 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
+#include <glib/gstdio.h>
#include "gr-number.h"
-#include "gr-number.c"
#include "gr-utils.h"
-#include "gr-utils.c"
static GString *string;
diff --git a/tests/strv.c b/tests/strv.c
index d2e7814..6fdd361 100644
--- a/tests/strv.c
+++ b/tests/strv.c
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <glib.h>
#include "gr-utils.h"
-#include "gr-utils.c"
static void
test_strv_prepend (void)
diff --git a/tests/unit.c b/tests/unit.c
index 07d2509..0b8981a 100644
--- a/tests/unit.c
+++ b/tests/unit.c
@@ -19,11 +19,10 @@
#include "config.h"
#include <locale.h>
#include <stdio.h>
+#include <string.h>
#include <glib.h>
#include "gr-unit.h"
-#include "gr-unit.c"
#include "gr-utils.h"
-#include "gr-utils.c"
static GString *string;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]