blob: 0d901769ab9cc1d4989d963204b456e97ca67d5d [file] [log] [blame]
hardlyb1e7e142014-08-06 00:43:51 +03001#pragma once
2
3// taken from https://gcc.gnu.org/wiki/Visibility
4#if defined _WIN32 || defined __CYGWIN__
5 #ifdef BUILDING_DLL
6 #ifdef __GNUC__
7 #define DLL_PUBLIC __attribute__ ((dllexport))
8 #else
9 #define DLL_PUBLIC __declspec(dllexport)
10 #endif
11 #else
12 #ifdef __GNUC__
13 #define DLL_PUBLIC __attribute__ ((dllimport))
14 #else
15 #define DLL_PUBLIC __declspec(dllimport)
16 #endif
17 #endif
18#else
19 #ifdef BUILDING_DLL
20 #if __GNUC__ >= 4
21 #define DLL_PUBLIC __attribute__ ((visibility ("default")))
22 #else
23 #define DLL_PUBLIC
24 #endif
25 #else
26 #define DLL_PUBLIC
27 #endif
28#endif
29
onqtam862a3bb2016-04-27 18:19:00 +030030#define DOCTEST_CONFIG_IMPLEMENT
hardlyb1e7e142014-08-06 00:43:51 +030031#include "doctest.h"
32
33#include <cstdio>
34
onqtamec757002016-05-06 01:56:21 +030035TEST_CASE("shared") {
hardlyb1e7e142014-08-06 00:43:51 +030036 printf("I am a test in a header used by the executable and the dll!\n");
37}
38
39DLL_PUBLIC int call_tests_from_dll(int argc, char** argv);