• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2016.
2 // Distributed under the Boost Software License, Version 1.0.
3 //    (See accompanying file LICENSE_1_0.txt or copy at
4 //          http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/metaparse/config.hpp>
7 
8 #if BOOST_METAPARSE_STD >= 2011
9 
10 #define BOOST_METAPARSE_LIMIT_STRING_SIZE 1024
11 #include <boost/metaparse/string.hpp>
12 
13 #include <boost/type_traits/is_same.hpp>
14 
15 #include "common.hpp"
16 #include "test_case.hpp"
17 #include "string_macros.hpp"
18 
19 #ifndef BOOST_METAPARSE_V1_CONFIG_NO_BOOST_METAPARSE_STRING
20 
21 using boost::metaparse::string;
22 using boost::is_same;
23 
BOOST_METAPARSE_TEST_CASE(creating_very_long_string)24 BOOST_METAPARSE_TEST_CASE(creating_very_long_string)
25 {
26 // The Oracle Studio limit is 127 characters
27 #ifndef __SUNPRO_CC
28   BOOST_MPL_ASSERT((
29     is_same<
30       string<
31         BOOST_METAPARSE_TEST_CHARS_100,
32         BOOST_METAPARSE_TEST_CHARS_100,
33         BOOST_METAPARSE_TEST_CHARS_100,
34         BOOST_METAPARSE_TEST_CHARS_100,
35         BOOST_METAPARSE_TEST_CHARS_100,
36         BOOST_METAPARSE_TEST_CHARS_10,
37         '0', '1'
38       >,
39       BOOST_METAPARSE_STRING(
40         BOOST_METAPARSE_TEST_STRING_100
41         BOOST_METAPARSE_TEST_STRING_100
42         BOOST_METAPARSE_TEST_STRING_100
43         BOOST_METAPARSE_TEST_STRING_100
44         BOOST_METAPARSE_TEST_STRING_100
45         BOOST_METAPARSE_TEST_STRING_10
46         "01"
47       )
48     >
49   ));
50 #endif
51 }
52 
53 #endif
54 
55 #endif
56 
57