Commit 7008d4b0 authored by J.J. Green's avatar J.J. Green

add compatibility header

parent 5280a675
Pipeline #23734787 passed with stage
in 48 seconds
/*
cunit_compat.h
Compatibility macros to handle different versions of CUnit,
in particular the changes to the suite struct introduced in
version 2.1-3
Copyright (c) J.J. Green 2016
*/
#ifndef CUNIT_COMPAT_H
#define CUNIT_COMPAT_H
/* default to 2.1-3 or later */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef CUNIT_213
#define CUNIT_213 1
#endif
#if CUNIT_213
#define CU_Suite_Entry(a, b, c, d) {(a), (b), (c), NULL, NULL, (d)}
#else
#define CU_Suite_Entry(a, b, c, d) {(a), (b), (c), (d)}
#endif
#endif
......@@ -11,11 +11,12 @@
#include <CUnit/CUnit.h>
#include "cunit_compat.h"
#include "tests_pia.h"
static CU_SuiteInfo suites[] =
{
{"pia", NULL, NULL, tests_pia},
CU_Suite_Entry("pia", NULL, NULL, tests_pia),
CU_SUITE_INFO_NULL,
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment