Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66850 - trunk/libs/spirit/test/lex
From: hartmut.kaiser_at_[hidden]
Date: 2010-11-29 14:05:50


Author: hkaiser
Date: 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
New Revision: 66850
URL: http://svn.boost.org/trac/boost/changeset/66850

Log:
Spirit: fixing warnings in lexer tests
Text files modified:
   trunk/libs/spirit/test/lex/id_type_enum.cpp | 4 ++--
   trunk/libs/spirit/test/lex/regression007.cpp | 6 +++---
   trunk/libs/spirit/test/lex/regression008.cpp | 4 ++--
   trunk/libs/spirit/test/lex/regression009.cpp | 2 +-
   trunk/libs/spirit/test/lex/regression010.cpp | 4 ++--
   5 files changed, 10 insertions(+), 10 deletions(-)

Modified: trunk/libs/spirit/test/lex/id_type_enum.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/id_type_enum.cpp (original)
+++ trunk/libs/spirit/test/lex/id_type_enum.cpp 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
@@ -83,11 +83,11 @@
     token_iterator begin2 = l.begin(begin, end);
     token_iterator end2 = l.end();
     
- int test_data[] = { ID_EOL, ID_WORD, ID_EOL };
+ token_id test_data[] = { ID_EOL, ID_WORD, ID_EOL };
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 
     token_iterator it = begin2;
- int i = 0;
+ std::size_t i = 0;
     for (/**/; it != end2 && i < test_data_size; ++it, ++i)
     {
         BOOST_TEST(it->id() == test_data[i]);

Modified: trunk/libs/spirit/test/lex/regression007.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/regression007.cpp (original)
+++ trunk/libs/spirit/test/lex/regression007.cpp 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
@@ -35,7 +35,7 @@
     return file_iterator(
         spirit::make_default_multi_pass(
             std::istreambuf_iterator<char>(input)),
- spirit::multi_pass<std::istreambuf_iterator<char>>(),
+ spirit::multi_pass<std::istreambuf_iterator<char> >(),
         filename);
 }
 
@@ -92,11 +92,11 @@
     token_iterator begin2 = l.begin(begin, end, "ST");
     token_iterator end2 = l.end();
     
- int test_data[] = { 1, 3, 2 };
+ std::size_t test_data[] = { 1, 3, 2 };
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 
     token_iterator it = begin2;
- int i = 0;
+ std::size_t i = 0;
     for (/**/; it != end2 && i < test_data_size; ++it, ++i)
     {
         BOOST_TEST(it->id() == test_data[i]);

Modified: trunk/libs/spirit/test/lex/regression008.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/regression008.cpp (original)
+++ trunk/libs/spirit/test/lex/regression008.cpp 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
@@ -99,11 +99,11 @@
     token_iterator begin2 = l.begin(begin, end, "ST");
     token_iterator end2 = l.end();
     
- int test_data[] = { 1, 3, 2 };
+ std::size_t test_data[] = { 1, 3, 2 };
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 
     token_iterator it = begin2;
- int i = 0;
+ std::size_t i = 0;
     for (/**/; it != end2 && i < test_data_size; ++it, ++i)
     {
         BOOST_TEST(it->id() == test_data[i]);

Modified: trunk/libs/spirit/test/lex/regression009.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/regression009.cpp (original)
+++ trunk/libs/spirit/test/lex/regression009.cpp 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
@@ -89,7 +89,7 @@
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 
     token_iterator it = begin2;
- int i = 0;
+ std::size_t i = 0;
     for (/**/; it != end2 && i < test_data_size; ++it, ++i)
     {
         std::stringstream ss;

Modified: trunk/libs/spirit/test/lex/regression010.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/regression010.cpp (original)
+++ trunk/libs/spirit/test/lex/regression010.cpp 2010-11-29 14:05:45 EST (Mon, 29 Nov 2010)
@@ -84,11 +84,11 @@
     token_iterator begin2 = l.begin(begin, end);
     token_iterator end2 = l.end();
     
- int test_data[] = { 2, 1, 2 };
+ std::size_t test_data[] = { 2, 1, 2 };
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 
     token_iterator it = begin2;
- int i = 0;
+ std::size_t i = 0;
     for (/**/; it != end2 && i < test_data_size; ++it, ++i)
     {
         BOOST_TEST(it->id() == test_data[i]);


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