From d4495620456b9be76e25ff83e038f6dedd92576d Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 4 Apr 2005 19:40:32 +0000 Subject: [PATCH] Added more unit tests. [SVN r27959] --- ChangeLog | 8 +- include/boost/wave/cpp_exceptions.hpp | 15 ++- include/boost/wave/util/cpp_macromap.hpp | 5 + .../boost/wave/util/cpp_macromap_utils.hpp | 24 ++++ test/testwave/testfiles/005_007.hpp | 32 ----- test/testwave/testfiles/005_008.cpp | 62 +++++++++ test/testwave/testfiles/005_009.cpp | 57 +++++++++ test/testwave/testfiles/005_010.cpp | 47 +++++++ test/testwave/testfiles/005_011.cpp | 54 ++++++++ test/testwave/testfiles/005_012.cpp | 74 +++++++++++ test/testwave/testfiles/005_013.cpp | 82 ++++++++++++ test/testwave/testfiles/005_014.cpp | 118 ++++++++++++++++++ test/testwave/testfiles/005_015.cpp | 93 ++++++++++++++ test/testwave/testfiles/005_016.cpp | 79 ++++++++++++ test/testwave/testfiles/005_017.cpp | 88 +++++++++++++ test/testwave/testfiles/005_018.cpp | 91 ++++++++++++++ test/testwave/testfiles/005_019.cpp | 72 +++++++++++ test/testwave/testfiles/test.cfg | 12 ++ 18 files changed, 973 insertions(+), 40 deletions(-) create mode 100644 test/testwave/testfiles/005_008.cpp create mode 100644 test/testwave/testfiles/005_009.cpp create mode 100644 test/testwave/testfiles/005_010.cpp create mode 100644 test/testwave/testfiles/005_011.cpp create mode 100644 test/testwave/testfiles/005_012.cpp create mode 100644 test/testwave/testfiles/005_013.cpp create mode 100644 test/testwave/testfiles/005_014.cpp create mode 100644 test/testwave/testfiles/005_015.cpp create mode 100644 test/testwave/testfiles/005_016.cpp create mode 100644 test/testwave/testfiles/005_017.cpp create mode 100644 test/testwave/testfiles/005_018.cpp create mode 100644 test/testwave/testfiles/005_019.cpp diff --git a/ChangeLog b/ChangeLog index e2c9d1a..2e955b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,7 +24,7 @@ TODO (known issues): CHANGELOG - Fixed a bug in the white space eating component, which prevented a C++ - comment to be supressed if it followed after another whitespace. + comment to be suppressed if it followed after another whitespace. - Fixed the inconsistencies between the documentation and the behaviour wrt the different include search paths. See the Wave driver docs for details of how the '-I', '-I-', and '-S' options work. @@ -36,7 +36,7 @@ CHANGELOG tokens (instead of beeing igored completely). - Fixed a bug in the white space eater component. - Fixed a bug which reported wrong line numbers for error encountered during - retokenisation (concatenation). + retokenisation (concatination). - Fixed a bug in the unescaping code. - Fixed a compilation error of the testwave executable (added a missing namespace specifier). @@ -54,6 +54,10 @@ CHANGELOG - If the comments should not be preserved every C comment containing at minimum one newline is now converted to a newline token. - Added the lexed_tokens sample. +- Fixed warnings and errors reported by the CodeWarrior compiler. +- Added the '$V' replacement string to the testwave application. It expands to + the current BOOST_LIB_VERSION. +- Diagnosed the attempt to redefine the alternative operators as and, or etc. Tue Mar 22 14:52:45 WEST 2005 Version 1.1.15 diff --git a/include/boost/wave/cpp_exceptions.hpp b/include/boost/wave/cpp_exceptions.hpp index 0d7cf8b..3c90b18 100644 --- a/include/boost/wave/cpp_exceptions.hpp +++ b/include/boost/wave/cpp_exceptions.hpp @@ -153,7 +153,8 @@ public: undefined_macroname, invalid_macroname, unexpected_qualified_name, - division_by_zero + division_by_zero, + illegal_operator_redefinition }; preprocess_exception(char const *what_, error_code code, int line_, @@ -218,11 +219,12 @@ public: "a macro or scope name", // alreadydefined_name "undefined macro or scope name may not be imported", // undefined_macroname "ill formed macro name", // invalid_macroname - "qualified names are supported in C++0x mode only", // unexpected_qualified_name - "division by zero in preprocessor expression" // division_by_zero + "qualified names are supported in C++0x mode only", // unexpected_qualified_name + "division by zero in preprocessor expression", // division_by_zero + "this macro name cannot be used as a as it is an operator in C++" // illegal_operator_redefinition }; BOOST_ASSERT(unexpected_error <= code && - code <= division_by_zero); + code <= illegal_operator_redefinition); return preprocess_exception_errors[code]; } @@ -259,10 +261,11 @@ public: util::severity_error, // undefined_macroname util::severity_error, // invalid_macroname util::severity_error, // unexpected_qualified_name - util::severity_fatal // division_by_zero + util::severity_fatal, // division_by_zero + util::severity_error // illegal_operator_redefinition }; BOOST_ASSERT(unexpected_error <= code && - code <= division_by_zero); + code <= illegal_operator_redefinition); return preprocess_exception_severity[code]; } static char const *severity_text(int code) diff --git a/include/boost/wave/util/cpp_macromap.hpp b/include/boost/wave/util/cpp_macromap.hpp index 00a1db3..e446d60 100644 --- a/include/boost/wave/util/cpp_macromap.hpp +++ b/include/boost/wave/util/cpp_macromap.hpp @@ -213,6 +213,11 @@ macromap::add_macro(token_type const &name, bool has_parameters, BOOST_WAVE_THROW(preprocess_exception, illegal_redefinition, name.get_value(), main_pos); } + if (AltExtTokenType == (token_id(name) & ExtTokenOnlyMask)) { + // exclude special operator names + BOOST_WAVE_THROW(preprocess_exception, illegal_operator_redefinition, + name.get_value(), main_pos); + } // try to define the new macro defined_macros_type *current_scope = scope ? scope : current_macros; diff --git a/include/boost/wave/util/cpp_macromap_utils.hpp b/include/boost/wave/util/cpp_macromap_utils.hpp index 4658abe..c0bb541 100644 --- a/include/boost/wave/util/cpp_macromap_utils.hpp +++ b/include/boost/wave/util/cpp_macromap_utils.hpp @@ -152,6 +152,30 @@ is_special_macroname (StringT const &name) return false; } +/////////////////////////////////////////////////////////////////////////////// +// +// Test, whether a given identifier resolves to a operator name +// +/////////////////////////////////////////////////////////////////////////////// +//template +//inline bool +//is_operator_macroname (StringT const &name) +//{ +// if (name.size() < 2 || name.size() > 6) +// return false; +// +// if (str == "and" || str == "and_eq" || +// str == "bitand" || str == "bitor" || +// str == "compl" || +// str == "not" || str == "not_eq" || +// str == "or" || str == "or_eq" || +// str == "xor" || str == "xor_eq") +// { +// return true; +// } +// return false; +//} + /////////////////////////////////////////////////////////////////////////////// // // Test, whether two tokens are to be considered equal (different sequences diff --git a/test/testwave/testfiles/005_007.hpp b/test/testwave/testfiles/005_007.hpp index efe2344..47ef57f 100644 --- a/test/testwave/testfiles/005_007.hpp +++ b/test/testwave/testfiles/005_007.hpp @@ -5,40 +5,8 @@ Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - The tests included in this file were initially taken from the mcpp V2.5 - preprocessor validation suite and were modified to fit into the Boost.Wave - unit test requirements. - The original files of the mcpp preprocessor are distributed under the - license reproduced at the end of this file. =============================================================================*/ // Tests the #include directive. #define MACRO_005_007 abc -/*- - * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - diff --git a/test/testwave/testfiles/005_008.cpp b/test/testwave/testfiles/005_008.cpp new file mode 100644 index 0000000..b3723a8 --- /dev/null +++ b/test/testwave/testfiles/005_008.cpp @@ -0,0 +1,62 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests the #line directive. + +// 7.1: Line number and filename. +//R #line 1234 "cpp" +#line 1234 "cpp" +__LINE__ //R 1234 +__FILE__ //R "cpp" + +// 7.2: Filename argument is optional. +//R #line 2345 "cpp" +#line 2345 +__LINE__ //R 2345 +__FILE__ //R "cpp" + +// 7.3: Argument with macro. +//R #line 1234 "005_008.cpp" +#define LINE_AND_FILENAME 1234 "005_008.cpp" +#line LINE_AND_FILENAME +__LINE__ //R 1234 +__FILE__ //R "005_008.cpp" + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_009.cpp b/test/testwave/testfiles/005_009.cpp new file mode 100644 index 0000000..b3325a7 --- /dev/null +++ b/test/testwave/testfiles/005_009.cpp @@ -0,0 +1,57 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests the #error directive. + +// 8.1: The original mcpp validation suite claims: +// Argument of #error directive is not a subject of macro expansion. +// +// But the Standard doesn't say anything about this (neither the C99 nor +// the C++ Standard), so Wave allows to be configured at compile time +// whether to macro expand the arguments to an #error directive. +// This test assumes that macro expansion is enabled. + +//E 005_009.cpp(29): fatal error: encountered #error directive or #pragma wave stop(): 0 is not a positive number. +#define MACRO 0 +#if MACRO <= 0 +#error MACRO is not a positive number. +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_010.cpp b/test/testwave/testfiles/005_010.cpp new file mode 100644 index 0000000..566e16c --- /dev/null +++ b/test/testwave/testfiles/005_010.cpp @@ -0,0 +1,47 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests, whether the argument of #error is optional + +// 8.2: #error should be executed even without argument. +//E 005_010.cpp(20): fatal error: encountered #error directive or #pragma wave stop() +#error + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_011.cpp b/test/testwave/testfiles/005_011.cpp new file mode 100644 index 0000000..b7fcb61 --- /dev/null +++ b/test/testwave/testfiles/005_011.cpp @@ -0,0 +1,54 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests, whether the argument of #error is optional + +// 9.1: Any #pragma directive should be processed or ignored, should not +// be diagnosed as an error. +// Wave allows to be configured at compile time, whether unknown #pragmas +// are left untouched or skipped entirely (see the +// BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES pp constant) + +//R #line 27 "005_011.cpp" +//R #pragma who knows ? +#pragma once +#pragma who knows ? + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_012.cpp b/test/testwave/testfiles/005_012.cpp new file mode 100644 index 0000000..ae97831 --- /dev/null +++ b/test/testwave/testfiles/005_012.cpp @@ -0,0 +1,74 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests #if, #elif, #else and #endif pp-directives. + +#define MACRO_0 0 +#define MACRO_1 1 + +// 10.1: +// Note: an undefined identifier in #if expression is replaced to 0. +//R #line 30 "005_012.cpp" +//R true +#if a +false +#elif MACRO_0 +false +#elif MACRO_1 /* Valid block */ +true +#else +false +#endif + +// 10.2: Comments must be processed even if in skipped #if block. +// At least tokenization of string literal and character constant is +// necessary to process comments, e.g. /* is not a comment mark in string +// literal. + +//R #line 46 "005_012.cpp" +//R true +#ifdef UNDEFINED + /* Comment */ + "in literal /* is not a comment" +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_013.cpp b/test/testwave/testfiles/005_013.cpp new file mode 100644 index 0000000..39f6f12 --- /dev/null +++ b/test/testwave/testfiles/005_013.cpp @@ -0,0 +1,82 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests operator "defined" in #if or #elif directives. + +#define MACRO_abc abc +#define MACRO_0 2 +#define ZERO_TOKEN + +// 11.1: +//R #line 28 "005_013.cpp" +//R true +#if defined a +false +#else +true +#endif + +//R #line 34 "005_013.cpp" +//R true +#if defined (MACRO_abc) +true +#else +false +#endif + +// 11.2: "defined" is an unary operator whose result is 1 or 0. + +//R #line 46 "005_013.cpp" +//R true +#if defined MACRO_0 * 3 != 3 +false +#else +true +#endif + +//R #line 54 "005_013.cpp" +//R true +#if (!defined ZERO_TOKEN != 0) || (-defined ZERO_TOKEN != -1) +false +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_014.cpp b/test/testwave/testfiles/005_014.cpp new file mode 100644 index 0000000..915a3d3 --- /dev/null +++ b/test/testwave/testfiles/005_014.cpp @@ -0,0 +1,118 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests integer preprocessing number token and type of #if expression. + +#define LONG_MIN (-2147483647L - 1) /* minimum (signed) long value */ +#define LONG_MAX 2147483647L /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffffUL /* maximum unsigned long value */ + +// 12.1: +//R #line 28 "005_014.cpp" +//R true +#if LONG_MAX <= LONG_MIN + "Bad evaluation of long." +#else +true +#endif + +//R #line 36 "005_014.cpp" +//R true +#if LONG_MAX <= 1073741823 /* 0x3FFFFFFF */ + "Bad evaluation of long." +#else +true +#endif + +// 12.2: +//R #line 45 "005_014.cpp" +//R true +#if ULONG_MAX / 2 < LONG_MAX + "Bad evaluation of unsigned long." +#else +true +#endif + +// 12.3: Octal number. +//R #line 54 "005_014.cpp" +//R true +#if 0177777 != 65535 + "Bad evaluation of octal number." +#else +true +#endif + +// 12.4: Hexadecimal number. +//R #line 63 "005_014.cpp" +//R true +#if 0Xffff != 65535 || 0xFfFf != 65535 + "Bad evaluation of hexadecimal number." +#else +true +#endif + +// 12.5: Suffix 'L' or 'l'. +//R #line 72 "005_014.cpp" +//R true +#if 0L != 0 || 0l != 0 + "Bad evaluation of 'L' suffix." +#else +true +#endif + +// 12.6: Suffix 'U' or 'u'. +//R #line 81 "005_014.cpp" +//R true +#if 1U != 1 || 1u != 1 + "Bad evaluation of 'U' suffix." +#else +true +#endif + +// 12.7: Negative integer. +//R #line 90 "005_014.cpp" +//R true +#if 0 <= -1 + "Bad evaluation of negative number." +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_015.cpp b/test/testwave/testfiles/005_015.cpp new file mode 100644 index 0000000..a08a421 --- /dev/null +++ b/test/testwave/testfiles/005_015.cpp @@ -0,0 +1,93 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests valid operators in #if expression. + +// Valid operators are (precedence in this order) : +// defined, (unary)+, (unary)-, ~, !, +// *, /, %, +// +, -, +// <<, >>, +// <, >, <=, >=, +// ==, !=, +// &, +// ^, +// |, +// &&, +// ||, +// ? : + +// 13.1: Bit shift. +//R #line 38 "005_015.cpp" +//R true +#if 1 << 2 != 4 || 8 >> 1 != 4 + "Bad arithmetic of <<, >> operators." +#else +true +#endif + +// 13.2: Bitwise operators. +//R #line 47 "005_015.cpp" +//R true +#if (3 ^ 5) != 6 || (3 | 5) != 7 || (3 & 5) != 1 + "Bad arithmetic of ^, |, & operators." +#else +true +#endif + +// 13.3: Result of ||, && operators is either of 1 or 0. +//R #line 56 "005_015.cpp" +//R true +#if (2 || 3) != 1 || (2 && 3) != 1 || (0 || 4) != 1 || (0 && 5) != 0 + "Bad arithmetic of ||, && operators." +#else +true +#endif + +// 13.4: ?, : operator. +//R #line 65 "005_015.cpp" +//R true +#if (0 ? 1 : 2) != 2 + "Bad arithmetic of ?: operator."; +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_016.cpp b/test/testwave/testfiles/005_016.cpp new file mode 100644 index 0000000..d03e670 --- /dev/null +++ b/test/testwave/testfiles/005_016.cpp @@ -0,0 +1,79 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests arithmetic conversion in #if expressions. + +// 13.5: The usual arithmetic conversion is not performed on bit shift. +//R #line 24 "005_016.cpp" +//R true +#if -1 << 3U > 0 + "Bad conversion of bit shift operands." +#else +true +#endif + +// 13.6: Usual arithmetic conversions. +//R #line 33 "005_016.cpp" +//R true +#if -1 <= 0U /* -1 is converted to unsigned long. */ + "Bad arithmetic conversion." +#else +true +#endif + +//R #line 41 "005_016.cpp" +//R true +#if -1 * 1U <= 0 + "Bad arithmetic conversion." +#else +true +#endif + +// Second and third operands of conditional operator are converted to the +// same type, thus -1 is converted to unsigned long. +//R #line 51 "005_016.cpp" +//R true +#if (1 ? -1 : 0U) <= 0 + "Bad arithmetic conversion."; +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_017.cpp b/test/testwave/testfiles/005_017.cpp new file mode 100644 index 0000000..eb44499 --- /dev/null +++ b/test/testwave/testfiles/005_017.cpp @@ -0,0 +1,88 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests short-circuit evaluation of #if expression. + +#define MACRO_0 0 + +// 13.7: 10/0 or 10/MACRO_0 are never evaluated, "divide by zero" error +// cannot occur. + +//R #line 28 "005_017.cpp" +//R true +#if 0 && 10 / 0 +false +#else +true +#endif + +//R #line 36 "005_017.cpp" +//R true +#if not_defined && 10 / not_defined +false +#else +true +#endif + +//R #line 44 "005_017.cpp" +//R true +#if MACRO_0 && 10 / MACRO_0 > 1 +false +#else +true +#endif + +//R #line 52 "005_017.cpp" +//R true +#if MACRO_0 ? 10 / MACRO_0 : 0 +false +#else +true +#endif + +//R #line 58 "005_017.cpp" +//R true +#if MACRO_0 == 0 || 10 / MACRO_0 > 1 /* Valid block */ +true +#else +false +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_018.cpp b/test/testwave/testfiles/005_018.cpp new file mode 100644 index 0000000..bbdb516 --- /dev/null +++ b/test/testwave/testfiles/005_018.cpp @@ -0,0 +1,91 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests grouping of sub-expressions in #if expression. + +// 13.8: Unary operators are grouped from right to left. +//R #line 24 "005_018.cpp" +//R true +#if (- -1 != 1) || (!!9 != 1) || (-!+!9 != -1) || (~~1 != 1) + "Bad grouping of -, +, !, ~ in #if expression." +#else +true +#endif + +// 13.9: ?: operators are grouped from right to left. +//R #line 33 "005_018.cpp" +//R true +#if (1 ? 2 ? 3 ? 3 : 2 : 1 : 0) != 3 + "Bad grouping of ? : in #if expression." +#else +true +#endif + +// 13.10: Other operators are grouped from left to right. +//R #line 42 "005_018.cpp" +//R true +#if (15 >> 2 >> 1 != 1) || (3 << 2 << 1 != 24) + "Bad grouping of >>, << in #if expression." +#else +true +#endif + +// 13.11: Test of precedence. +//R #line 51 "005_018.cpp" +//R true +#if 3*10/2 >> !0*2 >> !+!-9 != 1 + "Bad grouping of -, +, !, *, /, >> in #if expression." +#else +true +#endif + +// 13.12: Overall test. Grouped as: +// ((((((+1 - -1 - ~~1 - -!0) & 6) | ((8 % 9) ^ (-2 * -2))) >> 1) == 7) +// ? 7 : 0) != 7 +// evaluates to false. +//R #line 63 "005_018.cpp" +//R true +#if (((+1- -1-~~1- -!0&6|8%9^-2*-2)>>1)==7?7:0)!=7 + "Bad arithmetic of #if expression." +#else +true +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/005_019.cpp b/test/testwave/testfiles/005_019.cpp new file mode 100644 index 0000000..22698ac --- /dev/null +++ b/test/testwave/testfiles/005_019.cpp @@ -0,0 +1,72 @@ +/*============================================================================= + Boost.Wave: A Standard compliant C++ preprocessor library + http://www.boost.org/ + + Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost + Software License, Version 1.0. (See accompanying file + LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + The tests included in this file were initially taken from the mcpp V2.5 + preprocessor validation suite and were modified to fit into the Boost.Wave + unit test requirements. + The original files of the mcpp preprocessor are distributed under the + license reproduced at the end of this file. +=============================================================================*/ + +// Tests #if expressions with macros. + +#define ZERO_TOKEN +#define MACRO_0 0 +#define MACRO_1 1 + +#define and_op && +#define or_op || +#define not_eq_op != +#define bitor_op | + +// 13.13: With macros expanding to operators. +//R #line 32 "005_019.cpp" +//R true +#if (1 bitor_op 2) == 3 and_op 4 not_eq_op 5 or_op 0 +// #if (1 | 2) == 3 && 4 != 5 || 0 +true +#else + "Bad evaluation of macros expanding to operators in #if expression." +#endif + +// 13.14: With macros expanding to nothing, nonsence but legal. +//R #line 42 "005_019.cpp" +//R true +#if ZERO_TOKEN MACRO_1 ZERO_TOKEN > ZERO_TOKEN MACRO_0 ZERO_TOKEN +// #if 1 > 0 +true +#else + "Bad evaluation of macros expanding to 0 token in #if expression." +#endif + +/*- + * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + diff --git a/test/testwave/testfiles/test.cfg b/test/testwave/testfiles/test.cfg index e049204..f588f60 100644 --- a/test/testwave/testfiles/test.cfg +++ b/test/testwave/testfiles/test.cfg @@ -95,6 +95,18 @@ 005_005.cpp 005_006.cpp 005_007.cpp +005_008.cpp +005_009.cpp +005_010.cpp +005_011.cpp +005_012.cpp +005_013.cpp +005_014.cpp +005_015.cpp +005_016.cpp +005_017.cpp +005_018.cpp +005_019.cpp # # 999: General preprocessing problems