t_5_007.cpp 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. Some of the tests included in this file were initially taken from the mcpp
  8. V2.5 preprocessor validation suite and were modified to fit into the
  9. Boost.Wave unit test requirements.
  10. The original files of the mcpp preprocessor are distributed under the
  11. license reproduced at the end of this file.
  12. =============================================================================*/
  13. // Tests the #include directive (need to switch off include guard detection).
  14. //O --noguard
  15. // 6.1: Header-name quoted by " and " as well as by < and > can include
  16. // standard headers.
  17. //R #line 23 "t_5_007.cpp"
  18. #include "boost/version.hpp"
  19. BOOST_LIB_VERSION //R "$V"
  20. //R #line 29 "t_5_007.cpp"
  21. #undef BOOST_VERSION_HPP
  22. #undef BOOST_LIB_VERSION
  23. #include <boost/version.hpp>
  24. BOOST_LIB_VERSION //R "$V"
  25. // 6.2: Macro is allowed in #include line.
  26. //R #line 36 "t_5_007.cpp"
  27. #undef MACRO_005_007
  28. #define HEADER "t_5_007.hpp"
  29. #include HEADER
  30. MACRO_005_007 //R abc
  31. // 6.3: With macro nonsense but legal.
  32. //R #line 43 "t_5_007.cpp"
  33. #undef MACRO_005_007
  34. #define ZERO_TOKEN
  35. #include ZERO_TOKEN HEADER ZERO_TOKEN
  36. MACRO_005_007 //R abc
  37. /*-
  38. * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui <kmatsui@t3.rim.or.jp>
  39. * All rights reserved.
  40. *
  41. * Redistribution and use in source and binary forms, with or without
  42. * modification, are permitted provided that the following conditions
  43. * are met:
  44. * 1. Redistributions of source code must retain the above copyright
  45. * notice, this list of conditions and the following disclaimer.
  46. * 2. Redistributions in binary form must reproduce the above copyright
  47. * notice, this list of conditions and the following disclaimer in the
  48. * documentation and/or other materials provided with the distribution.
  49. *
  50. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
  51. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  52. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  53. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
  54. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  55. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  56. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  57. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  58. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  59. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  60. * SUCH DAMAGE.
  61. */