32 lines
703 B
C++
Raw Normal View History

2013-11-03 12:27:13 +02:00
#ifndef TEST_DEFINE
2016-07-09 11:21:54 +02:00
#error Expected definition TEST_DEFINE
2013-11-03 12:27:13 +02:00
#endif
#ifndef NEEDS_ESCAPE
2016-07-09 11:21:54 +02:00
#error Expected definition NEEDS_ESCAPE
2013-11-03 12:27:13 +02:00
#endif
#ifdef DO_GNU_TESTS
2016-07-09 11:21:54 +02:00
#ifndef TEST_DEFINE_GNU
#error Expected definition TEST_DEFINE_GNU
#endif
2013-11-03 12:27:13 +02:00
#endif
#include <string.h>
int main()
{
return (strcmp(NEEDS_ESCAPE, "E$CAPE") == 0
2015-04-27 22:25:09 +02:00
#ifdef TEST_OCTOTHORPE
2016-07-09 11:21:54 +02:00
&& strcmp(TEST_OCTOTHORPE, "#") == 0
2015-04-27 22:25:09 +02:00
#endif
2016-07-09 11:21:54 +02:00
&&
strcmp(EXPECTED_C_COMPILER_VERSION, TEST_C_COMPILER_VERSION) == 0 &&
strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) ==
0 &&
TEST_C_COMPILER_VERSION_EQUALITY == 1 &&
TEST_CXX_COMPILER_VERSION_EQUALITY == 1)
? 0
: 1;
2013-11-03 12:27:13 +02:00
}