mirror of
https://github.com/brl/mutter.git
synced 2024-12-12 14:20:17 +00:00
6885c37784
Just like libmutter-clutter, and libmutter, mark exported symbols with an COGL_EXPORT macro. This removes the .map and .map.in files previously used, containing a list of semi private symbols. This symbol was out of date, i.e. pointed to non-existing symbols, and was also replaced with COGL_EXPORT macros. unit_test_* symbols are exported by the help of the unit test defining macro. test_* symbols are no longer supported as it proved unnecessary. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1059
34 lines
744 B
C
34 lines
744 B
C
#ifndef _TEST_UNIT_H_
|
|
#define _TEST_UNIT_H_
|
|
|
|
#include <test-fixtures/test-utils.h>
|
|
|
|
#ifdef ENABLE_UNIT_TESTS
|
|
|
|
typedef struct _CoglUnitTest
|
|
{
|
|
const char *name;
|
|
TestFlags requirement_flags;
|
|
TestFlags known_failure_flags;
|
|
void (*run) (void);
|
|
} CoglUnitTest;
|
|
|
|
#define UNIT_TEST(NAME, REQUIREMENT_FLAGS, KNOWN_FAILURE_FLAGS) \
|
|
static void NAME (void); \
|
|
\
|
|
COGL_EXPORT \
|
|
const CoglUnitTest unit_test_##NAME; \
|
|
const CoglUnitTest unit_test_##NAME = \
|
|
{ #NAME, REQUIREMENT_FLAGS, KNOWN_FAILURE_FLAGS, NAME }; \
|
|
\
|
|
static void NAME (void)
|
|
|
|
#else /* ENABLE_UNIT_TESTS */
|
|
|
|
#define UNIT_TEST(NAME, REQUIREMENT_FLAGS, KNOWN_FAILURE_FLAGS) \
|
|
static inline void NAME (void)
|
|
|
|
#endif /* ENABLE_UNIT_TESTS */
|
|
|
|
#endif /* _TEST_UNIT_H_ */
|