From 6c1f6283bd93c213756d255a0b5e886864bb7ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Wed, 20 Jan 2016 20:31:17 +0100 Subject: [PATCH] Deduplicate fixture headers. --- test/Makefile.am | 10 +++++----- test/felica_fixture.c | 2 +- test/felica_fixture.h | 1 - test/fixture.h | 6 ++++++ test/mifare_classic_fixture.c | 2 +- test/mifare_classic_fixture.h | 1 - test/mifare_desfire_ev1_fixture.c | 2 +- test/mifare_desfire_ev1_fixture.h | 1 - test/mifare_desfire_fixture.c | 2 +- test/mifare_desfire_fixture.h | 1 - test/mifare_ultralight_fixture.c | 2 +- test/mifare_ultralight_fixture.h | 1 - test/test_felica.c | 2 +- test/test_mifare_classic.c | 2 +- test/test_mifare_classic_mad.c | 2 +- test/test_mifare_desfire.c | 2 +- test/test_mifare_desfire_ev1.c | 2 +- test/test_mifare_desfire_ev1_3des.c | 2 +- test/test_mifare_desfire_ev1_3k3des.c | 2 +- test/test_mifare_desfire_ev1_aes.c | 2 +- test/test_mifare_desfire_ev1_iso.c | 2 +- test/test_mifare_ultralight.c | 2 +- 22 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 test/felica_fixture.h create mode 100644 test/fixture.h delete mode 100644 test/mifare_classic_fixture.h delete mode 100644 test/mifare_desfire_ev1_fixture.h delete mode 100644 test/mifare_desfire_fixture.h delete mode 100644 test/mifare_ultralight_fixture.h diff --git a/test/Makefile.am b/test/Makefile.am index 096a4d5..797d192 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -37,7 +37,7 @@ AM_LDFLAGS = -module -rpath $(libdir) -avoid-version -no-undefined test_felica_la_SOURCES = test_felica.c \ felica_fixture.c \ - felica_fixture.h + fixture.h test_felica_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la test_freefare_la_SOURCES = test_freefare.c @@ -52,7 +52,7 @@ test_mifare_application_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la test_mifare_classic_la_SOURCES = test_mifare_classic.c \ test_mifare_classic_mad.c \ mifare_classic_fixture.c \ - mifare_classic_fixture.h + fixture.h test_mifare_classic_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la test_mifare_classic_create_trailer_block_la_SOURCES = test_mifare_classic_create_trailer_block.c @@ -63,7 +63,7 @@ test_mifare_classic_sector_boundaries_la_LIBADD = $(top_builddir)/libfreefare/li test_mifare_desfire_la_SOURCES = test_mifare_desfire.c \ mifare_desfire_fixture.c \ - mifare_desfire_fixture.h + fixture.h test_mifare_desfire_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la \ $(top_builddir)/test/common/libtestcommon.la @@ -82,7 +82,7 @@ test_mifare_desfire_ev1_la_SOURCES = test_mifare_desfire_ev1.c \ test_mifare_desfire_ev1_aes.c \ test_mifare_desfire_ev1_iso.c \ mifare_desfire_ev1_fixture.c \ - mifare_desfire_ev1_fixture.h + fixture.h test_mifare_desfire_ev1_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la \ $(top_builddir)/test/common/libtestcommon.la @@ -91,7 +91,7 @@ test_mifare_desfire_key_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la test_mifare_ultralight_la_SOURCES = test_mifare_ultralight.c \ mifare_ultralight_fixture.c \ - mifare_ultralight_fixture.h + fixture.h test_mifare_ultralight_la_LIBADD = $(top_builddir)/libfreefare/libfreefare.la test_tlv_la_SOURCES = test_tlv.c diff --git a/test/felica_fixture.c b/test/felica_fixture.c index b3eb2b5..0daef9e 100644 --- a/test/felica_fixture.c +++ b/test/felica_fixture.c @@ -1,7 +1,7 @@ #include #include -#include "felica_fixture.h" +#include "fixture.h" static nfc_context *context; static nfc_device *device = NULL; diff --git a/test/felica_fixture.h b/test/felica_fixture.h deleted file mode 100644 index f19cbf0..0000000 --- a/test/felica_fixture.h +++ /dev/null @@ -1 +0,0 @@ -extern FreefareTag tag; diff --git a/test/fixture.h b/test/fixture.h new file mode 100644 index 0000000..31d7922 --- /dev/null +++ b/test/fixture.h @@ -0,0 +1,6 @@ +#ifndef _FIXTURE_H +#define _FIXTURE_H + +extern FreefareTag tag; + +#endif /* _FIXTURE_H */ diff --git a/test/mifare_classic_fixture.c b/test/mifare_classic_fixture.c index cebeab0..2c3ddbb 100644 --- a/test/mifare_classic_fixture.c +++ b/test/mifare_classic_fixture.c @@ -1,7 +1,7 @@ #include #include -#include "mifare_classic_fixture.h" +#include "fixture.h" static nfc_context *context; static nfc_device *device = NULL; diff --git a/test/mifare_classic_fixture.h b/test/mifare_classic_fixture.h deleted file mode 100644 index f19cbf0..0000000 --- a/test/mifare_classic_fixture.h +++ /dev/null @@ -1 +0,0 @@ -extern FreefareTag tag; diff --git a/test/mifare_desfire_ev1_fixture.c b/test/mifare_desfire_ev1_fixture.c index dc0837b..beabdc3 100644 --- a/test/mifare_desfire_ev1_fixture.c +++ b/test/mifare_desfire_ev1_fixture.c @@ -1,7 +1,7 @@ #include #include -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" static nfc_context *context; static nfc_device *device = NULL; diff --git a/test/mifare_desfire_ev1_fixture.h b/test/mifare_desfire_ev1_fixture.h deleted file mode 100644 index f19cbf0..0000000 --- a/test/mifare_desfire_ev1_fixture.h +++ /dev/null @@ -1 +0,0 @@ -extern FreefareTag tag; diff --git a/test/mifare_desfire_fixture.c b/test/mifare_desfire_fixture.c index fee7add..ac6e39f 100644 --- a/test/mifare_desfire_fixture.c +++ b/test/mifare_desfire_fixture.c @@ -1,7 +1,7 @@ #include #include -#include "mifare_desfire_fixture.h" +#include "fixture.h" static nfc_context *context; static nfc_device *device = NULL; diff --git a/test/mifare_desfire_fixture.h b/test/mifare_desfire_fixture.h deleted file mode 100644 index f19cbf0..0000000 --- a/test/mifare_desfire_fixture.h +++ /dev/null @@ -1 +0,0 @@ -extern FreefareTag tag; diff --git a/test/mifare_ultralight_fixture.c b/test/mifare_ultralight_fixture.c index 0abc7f9..3560f25 100644 --- a/test/mifare_ultralight_fixture.c +++ b/test/mifare_ultralight_fixture.c @@ -1,7 +1,7 @@ #include #include -#include "mifare_ultralight_fixture.h" +#include "fixture.h" static nfc_context *context; static nfc_device *device = NULL; diff --git a/test/mifare_ultralight_fixture.h b/test/mifare_ultralight_fixture.h deleted file mode 100644 index f19cbf0..0000000 --- a/test/mifare_ultralight_fixture.h +++ /dev/null @@ -1 +0,0 @@ -extern FreefareTag tag; diff --git a/test/test_felica.c b/test/test_felica.c index 9055691..129f422 100644 --- a/test/test_felica.c +++ b/test/test_felica.c @@ -2,7 +2,7 @@ #include -#include "felica_fixture.h" +#include "fixture.h" void test_felica_read_without_encryption(void) diff --git a/test/test_mifare_classic.c b/test/test_mifare_classic.c index 02043f9..06a0c30 100644 --- a/test/test_mifare_classic.c +++ b/test/test_mifare_classic.c @@ -5,7 +5,7 @@ #include #include "freefare_internal.h" -#include "mifare_classic_fixture.h" +#include "fixture.h" void test_mifare_classic_authenticate(void) diff --git a/test/test_mifare_classic_mad.c b/test/test_mifare_classic_mad.c index e92a8b5..94fd1cc 100644 --- a/test/test_mifare_classic_mad.c +++ b/test/test_mifare_classic_mad.c @@ -2,7 +2,7 @@ #include -#include "mifare_classic_fixture.h" +#include "fixture.h" void test_mifare_classic_mad(void) diff --git a/test/test_mifare_desfire.c b/test/test_mifare_desfire.c index 3c9be58..6c50793 100644 --- a/test/test_mifare_desfire.c +++ b/test/test_mifare_desfire.c @@ -6,7 +6,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_desfire_ev1.c b/test/test_mifare_desfire_ev1.c index de98852..2ed7bb1 100644 --- a/test/test_mifare_desfire_ev1.c +++ b/test/test_mifare_desfire_ev1.c @@ -6,7 +6,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_desfire_ev1_3des.c b/test/test_mifare_desfire_ev1_3des.c index 6d29b42..49f776b 100644 --- a/test/test_mifare_desfire_ev1_3des.c +++ b/test/test_mifare_desfire_ev1_3des.c @@ -6,7 +6,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_desfire_ev1_3k3des.c b/test/test_mifare_desfire_ev1_3k3des.c index e8e5a57..048d0e0 100644 --- a/test/test_mifare_desfire_ev1_3k3des.c +++ b/test/test_mifare_desfire_ev1_3k3des.c @@ -6,7 +6,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_desfire_ev1_aes.c b/test/test_mifare_desfire_ev1_aes.c index d034af2..55b7b30 100644 --- a/test/test_mifare_desfire_ev1_aes.c +++ b/test/test_mifare_desfire_ev1_aes.c @@ -6,7 +6,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_desfire_ev1_iso.c b/test/test_mifare_desfire_ev1_iso.c index 26c40da..9a4993c 100644 --- a/test/test_mifare_desfire_ev1_iso.c +++ b/test/test_mifare_desfire_ev1_iso.c @@ -3,7 +3,7 @@ #include #include "freefare_internal.h" -#include "mifare_desfire_ev1_fixture.h" +#include "fixture.h" #include "common/mifare_desfire_auto_authenticate.h" #define cut_assert_success(last_command) \ diff --git a/test/test_mifare_ultralight.c b/test/test_mifare_ultralight.c index 7cc5f86..fdea38b 100644 --- a/test/test_mifare_ultralight.c +++ b/test/test_mifare_ultralight.c @@ -5,7 +5,7 @@ #include #include "freefare_internal.h" -#include "mifare_ultralight_fixture.h" +#include "fixture.h" void test_mifare_ultralight_write(void)