|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64973 - in trunk/libs/spirit/test: . qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-08-23 13:55:49
Author: hkaiser
Date: 2010-08-23 13:55:47 EDT (Mon, 23 Aug 2010)
New Revision: 64973
URL: http://svn.boost.org/trac/boost/changeset/64973
Log:
Added test case for broken debug output for optionals
Added:
trunk/libs/spirit/test/qi/debug_optional.cpp (contents, props changed)
Text files modified:
trunk/libs/spirit/test/Jamfile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2010-08-23 13:55:47 EDT (Mon, 23 Aug 2010)
@@ -160,6 +160,7 @@
[ run karma/karma_optional_double.cpp : : : : ]
[ run karma/semantic_action_attribute.cpp : : : : ]
[ compile qi/single_element_sequence_attribute.cpp : : qi_single_element_sequence_attribute ]
+ [ compile qi/debug_optional.cpp : : qi_debug_optional ]
;
Added: trunk/libs/spirit/test/qi/debug_optional.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/qi/debug_optional.cpp 2010-08-23 13:55:47 EDT (Mon, 23 Aug 2010)
@@ -0,0 +1,24 @@
+// Copyright (c) 2010 Carl Philipp Reh
+// Copyright (c) 2001-2010 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)
+
+// make sure optionals play well with debug output
+
+#define BOOST_SPIRIT_DEBUG
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/spirit/include/qi.hpp>
+#include <boost/spirit/home/support/attributes.hpp>
+#include <boost/optional.hpp>
+
+int main()
+{
+ boost::spirit::qi::rule<
+ char const *,
+ boost::optional<int>()
+ > foo;
+
+ BOOST_SPIRIT_DEBUG_NODE(foo);
+ return boost::report_errors();
+}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk