summaryrefslogtreecommitdiffstats
path: root/Tests/CompatibleInterface/main.cpp
blob: fa299e9db3c5040392241d06cee6f0575e8903af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

#ifndef BOOL_PROP1
#error Expected BOOL_PROP1
#endif

#ifndef BOOL_PROP2
#error Expected BOOL_PROP2
#endif

#ifndef BOOL_PROP3
#error Expected BOOL_PROP3
#endif

#ifndef STRING_PROP1
#error Expected STRING_PROP1
#endif

#ifndef STRING_PROP2
#error Expected STRING_PROP2
#endif

#ifndef STRING_PROP3
#error Expected STRING_PROP3
#endif

template<bool test>
struct CMakeStaticAssert;

template<>
struct CMakeStaticAssert<true> {};

enum {
  NumericMaxTest1 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP1 == 100>),
  NumericMaxTest2 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP2 == 250>),
  NumericMinTest1 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP1 == 50>),
  NumericMinTest2 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP2 == 200>)
};

#include "iface2.h"

int main(int argc, char **argv)
{
  Iface2 if2;
  return if2.foo();
}