t_2_004.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. // Tests #line functionality with macro expansion required
  9. #define LINE_NO 5
  10. #define FILE_NAME "a_nonexisting_file.cpp"
  11. #line LINE_NO FILE_NAME
  12. //R
  13. //E a_nonexisting_file.cpp(8): fatal error: encountered #error directive or #pragma wave stop(): This error should occur at line 8 of "a_nonexisting_file.cpp"
  14. #error This error should occur at line 8 of "a_nonexisting_file.cpp"
  15. //H 10: t_2_004.cpp(12): #define
  16. //H 08: t_2_004.cpp(12): LINE_NO=5
  17. //H 10: t_2_004.cpp(13): #define
  18. //H 08: t_2_004.cpp(13): FILE_NAME="a_nonexisting_file.cpp"
  19. //H 10: t_2_004.cpp(14): #line
  20. //H 01: t_2_004.cpp(12): LINE_NO
  21. //H 02: 5
  22. //H 03: 5
  23. //H 01: t_2_004.cpp(13): FILE_NAME
  24. //H 02: "a_nonexisting_file.cpp"
  25. //H 03: "a_nonexisting_file.cpp"
  26. //H 17: 5 "a_nonexisting_file.cpp" (5, "a_nonexisting_file.cpp")
  27. //H 10: a_nonexisting_file.cpp(8): #error
  28. //H 16: This error should occur at line 8 of "a_nonexisting_file.cpp"
  29. //H 18: boost::wave::preprocess_exception