genex_test.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef EXPECT_FINAL
  2. #error EXPECT_FINAL not defined
  3. #endif
  4. #ifndef EXPECT_INHERITING_CONSTRUCTORS
  5. #error EXPECT_INHERITING_CONSTRUCTORS not defined
  6. #endif
  7. #ifndef EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  8. #error EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL not defined
  9. #endif
  10. #ifndef EXPECT_OVERRIDE_CONTROL
  11. #error EXPECT_OVERRIDE_CONTROL not defined
  12. #endif
  13. #ifdef TEST_CXX_STD
  14. #if !HAVE_CXX_STD_11
  15. #error HAVE_CXX_STD_11 is false with CXX_STANDARD == 11
  16. #endif
  17. #if HAVE_CXX_STD_14
  18. #error HAVE_CXX_STD_14 is true with CXX_STANDARD == 11
  19. #endif
  20. #if HAVE_CXX_STD_17
  21. #error HAVE_CXX_STD_17 is true with CXX_STANDARD == 11
  22. #endif
  23. #endif
  24. #if !HAVE_OVERRIDE_CONTROL
  25. #if EXPECT_OVERRIDE_CONTROL
  26. #error "Expect override control feature"
  27. #endif
  28. #else
  29. #if !EXPECT_OVERRIDE_CONTROL
  30. #error "Expect no override control feature"
  31. #endif
  32. struct A
  33. {
  34. virtual int getA() { return 7; }
  35. };
  36. struct B final : A
  37. {
  38. int getA() override { return 42; }
  39. };
  40. #endif
  41. #if !HAVE_AUTO_TYPE
  42. #error Expect cxx_auto_type support
  43. #endif
  44. #if !HAVE_INHERITING_CONSTRUCTORS
  45. #if EXPECT_INHERITING_CONSTRUCTORS
  46. #error Expect cxx_inheriting_constructors support
  47. #endif
  48. #else
  49. #if !EXPECT_INHERITING_CONSTRUCTORS
  50. #error Expect no cxx_inheriting_constructors support
  51. #endif
  52. #endif
  53. #if !HAVE_FINAL
  54. #if EXPECT_FINAL
  55. #error Expect cxx_final support
  56. #endif
  57. #else
  58. #if !EXPECT_FINAL
  59. #error Expect no cxx_final support
  60. #endif
  61. #endif
  62. #if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
  63. #if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  64. #error Expect cxx_inheriting_constructors and cxx_final support
  65. #endif
  66. #else
  67. #if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  68. #error Expect no combined cxx_inheriting_constructors and cxx_final support
  69. #endif
  70. #endif
  71. int main()
  72. {
  73. }