Opened 14 years ago

Closed 12 years ago

#2292 closed Bugs (duplicate)

symbols_add_null* tests fail in release builds

Reported by: Dave Abrahams Owned by: Joel de Guzman
Milestone: Boost 1.37.0 Component: spirit
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description


Change History (2)

comment:1 by Dave Abrahams, 14 years ago

The following patch fixes the problem. I know things have been shuffled around for Boost 1.36, but maybe you can translate this into an appropriate fix there too.

Index: libs/spirit/test/symbols_add_null.cpp
===================================================================
--- libs/spirit/test/symbols_add_null.cpp	(revision 3118)
+++ libs/spirit/test/symbols_add_null.cpp	(working copy)
@@ -7,6 +7,12 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
+#ifdef NDEBUG
+// This test will not work when NDEBUG is #defined because it prevents the
+// assertion in symbols_.add from throwing as this test expects it to.
+# undef NDEBUG
+#endif
+
 #define BOOST_SPIRIT_ASSERT_EXCEPTION ::spirit_exception
 
 struct spirit_exception

comment:2 by Hartmut Kaiser, 12 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #3159

Note: See TracTickets for help on using tickets.