genex_test.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #if !HAVE_OVERRIDE_CONTROL
  14. #if EXPECT_OVERRIDE_CONTROL
  15. #error "Expect override control feature"
  16. #endif
  17. #else
  18. #if !EXPECT_OVERRIDE_CONTROL
  19. #error "Expect no override control feature"
  20. #endif
  21. struct A
  22. {
  23. virtual int getA() { return 7; }
  24. };
  25. struct B final : A
  26. {
  27. int getA() override { return 42; }
  28. };
  29. #endif
  30. #if !HAVE_AUTO_TYPE
  31. #error Expect cxx_auto_type support
  32. #endif
  33. #if !HAVE_INHERITING_CONSTRUCTORS
  34. #if EXPECT_INHERITING_CONSTRUCTORS
  35. #error Expect cxx_inheriting_constructors support
  36. #endif
  37. #else
  38. #if !EXPECT_INHERITING_CONSTRUCTORS
  39. #error Expect no cxx_inheriting_constructors support
  40. #endif
  41. #endif
  42. #if !HAVE_FINAL
  43. #if EXPECT_FINAL
  44. #error Expect cxx_final support
  45. #endif
  46. #else
  47. #if !EXPECT_FINAL
  48. #error Expect no cxx_final support
  49. #endif
  50. #endif
  51. #if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
  52. #if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  53. #error Expect cxx_inheriting_constructors and cxx_final support
  54. #endif
  55. #else
  56. #if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
  57. #error Expect no combined cxx_inheriting_constructors and cxx_final support
  58. #endif
  59. #endif
  60. int main()
  61. {
  62. }