|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81856 - trunk/libs/algorithm/test
From: marshall_at_[hidden]
Date: 2012-12-11 11:54:59
Author: marshall
Date: 2012-12-11 11:54:57 EST (Tue, 11 Dec 2012)
New Revision: 81856
URL: http://svn.boost.org/trac/boost/changeset/81856
Log:
Removed tabs from Boost.Algorithm - found by inspect tool
Text files modified:
trunk/libs/algorithm/test/copy_if_test1.cpp | 4
trunk/libs/algorithm/test/string_ref_test2.cpp | 200 ++++++++++++++++++++--------------------
2 files changed, 102 insertions(+), 102 deletions(-)
Modified: trunk/libs/algorithm/test/copy_if_test1.cpp
==============================================================================
--- trunk/libs/algorithm/test/copy_if_test1.cpp (original)
+++ trunk/libs/algorithm/test/copy_if_test1.cpp 2012-12-11 11:54:57 EST (Tue, 11 Dec 2012)
@@ -42,7 +42,7 @@
ba::copy_if ( c, back_inserter ( v ), is_false);
BOOST_CHECK ( v.size () == 0 );
-// All the elements
+// All the elements
v.clear ();
ba::copy_if ( c.begin (), c.end (), back_inserter ( v ), is_true);
BOOST_CHECK ( v.size () == c.size ());
@@ -54,7 +54,7 @@
BOOST_CHECK ( v.size () == c.size ());
BOOST_CHECK ( std::equal ( c.begin (), c.end (), v.begin ()));
-// Some of the elements
+// Some of the elements
v.clear ();
ba::copy_if ( c.begin (), c.end (), back_inserter ( v ), is_even );
BOOST_CHECK ( v.size () == std::count_if ( c.begin (), c.end (), is_even ));
Modified: trunk/libs/algorithm/test/string_ref_test2.cpp
==============================================================================
--- trunk/libs/algorithm/test/string_ref_test2.cpp (original)
+++ trunk/libs/algorithm/test/string_ref_test2.cpp 2012-12-11 11:54:57 EST (Tue, 11 Dec 2012)
@@ -16,113 +16,113 @@
typedef boost::string_ref string_ref;
void ends_with ( const char *arg ) {
- string_ref sr ( arg );
- string_ref sr2 ( arg );
- const char *p = arg;
-
- while ( !*p ) {
- BOOST_CHECK ( sr.ends_with ( p ));
- ++p;
- }
-
- while ( !sr2.empty ()) {
- BOOST_CHECK ( sr.ends_with ( sr2 ));
- sr2.remove_prefix (1);
- }
-
- sr2 = arg;
- while ( !sr2.empty ()) {
- BOOST_CHECK ( sr.ends_with ( sr2 ));
- sr2.remove_prefix (1);
- }
-
- BOOST_CHECK ( sr.ends_with ( string_ref ()));
- }
-
+ string_ref sr ( arg );
+ string_ref sr2 ( arg );
+ const char *p = arg;
+
+ while ( !*p ) {
+ BOOST_CHECK ( sr.ends_with ( p ));
+ ++p;
+ }
+
+ while ( !sr2.empty ()) {
+ BOOST_CHECK ( sr.ends_with ( sr2 ));
+ sr2.remove_prefix (1);
+ }
+
+ sr2 = arg;
+ while ( !sr2.empty ()) {
+ BOOST_CHECK ( sr.ends_with ( sr2 ));
+ sr2.remove_prefix (1);
+ }
+
+ BOOST_CHECK ( sr.ends_with ( string_ref ()));
+ }
+
void starts_with ( const char *arg ) {
- string_ref sr ( arg );
- string_ref sr2 ( arg );
- const char *p = arg + std::strlen ( arg ) - 1;
- while ( p >= arg ) {
- std::string foo ( arg, p + 1 );
- BOOST_CHECK ( sr.starts_with ( foo ));
- --p;
- }
-
- while ( !sr2.empty ()) {
- BOOST_CHECK ( sr.starts_with ( sr2 ));
- sr2.remove_suffix (1);
- }
+ string_ref sr ( arg );
+ string_ref sr2 ( arg );
+ const char *p = arg + std::strlen ( arg ) - 1;
+ while ( p >= arg ) {
+ std::string foo ( arg, p + 1 );
+ BOOST_CHECK ( sr.starts_with ( foo ));
+ --p;
+ }
+
+ while ( !sr2.empty ()) {
+ BOOST_CHECK ( sr.starts_with ( sr2 ));
+ sr2.remove_suffix (1);
+ }
- BOOST_CHECK ( sr.starts_with ( string_ref ()));
- }
+ BOOST_CHECK ( sr.starts_with ( string_ref ()));
+ }
void reverse ( const char *arg ) {
-// Round trip
- string_ref sr1 ( arg );
- std::string string1 ( sr1.rbegin (), sr1.rend ());
- string_ref sr2 ( string1 );
- std::string string2 ( sr2.rbegin (), sr2.rend ());
-
- BOOST_CHECK ( std::equal ( sr2.rbegin (), sr2.rend (), arg ));
- BOOST_CHECK ( string2 == arg );
- BOOST_CHECK ( std::equal ( sr1.begin (), sr1.end (), string2.begin ()));
- }
+// Round trip
+ string_ref sr1 ( arg );
+ std::string string1 ( sr1.rbegin (), sr1.rend ());
+ string_ref sr2 ( string1 );
+ std::string string2 ( sr2.rbegin (), sr2.rend ());
+
+ BOOST_CHECK ( std::equal ( sr2.rbegin (), sr2.rend (), arg ));
+ BOOST_CHECK ( string2 == arg );
+ BOOST_CHECK ( std::equal ( sr1.begin (), sr1.end (), string2.begin ()));
+ }
void find ( const char *arg ) {
- string_ref sr1 ( arg );
- const char *p = arg;
-
-// Find everything at the start
- while ( !sr1.empty ()) {
- string_ref::size_type pos = sr1.find(*p);
- BOOST_CHECK ( pos == 0 );
- sr1.remove_prefix (1);
- ++p;
- }
-
-// Find everything at the end
- sr1 = arg;
- p = arg + strlen ( arg ) - 1;
- while ( !sr1.empty ()) {
- string_ref::size_type pos = sr1.rfind(*p);
- BOOST_CHECK ( pos == sr1.size () - 1 );
- sr1.remove_suffix (1);
- --p;
- }
-
-// Find everything at the start
- sr1 = arg;
- p = arg;
- while ( !sr1.empty ()) {
- string_ref::size_type pos = sr1.find_first_of(*p);
- BOOST_CHECK ( pos == 0 );
- sr1.remove_prefix (1);
- ++p;
- }
-
-
-// Find everything at the end
- sr1 = arg;
- p = arg + strlen ( arg ) - 1;
- while ( !sr1.empty ()) {
- string_ref::size_type pos = sr1.find_last_of(*p);
- BOOST_CHECK ( pos == sr1.size () - 1 );
- sr1.remove_suffix (1);
- --p;
- }
- }
+ string_ref sr1 ( arg );
+ const char *p = arg;
+
+// Find everything at the start
+ while ( !sr1.empty ()) {
+ string_ref::size_type pos = sr1.find(*p);
+ BOOST_CHECK ( pos == 0 );
+ sr1.remove_prefix (1);
+ ++p;
+ }
+
+// Find everything at the end
+ sr1 = arg;
+ p = arg + strlen ( arg ) - 1;
+ while ( !sr1.empty ()) {
+ string_ref::size_type pos = sr1.rfind(*p);
+ BOOST_CHECK ( pos == sr1.size () - 1 );
+ sr1.remove_suffix (1);
+ --p;
+ }
+
+// Find everything at the start
+ sr1 = arg;
+ p = arg;
+ while ( !sr1.empty ()) {
+ string_ref::size_type pos = sr1.find_first_of(*p);
+ BOOST_CHECK ( pos == 0 );
+ sr1.remove_prefix (1);
+ ++p;
+ }
+
+
+// Find everything at the end
+ sr1 = arg;
+ p = arg + strlen ( arg ) - 1;
+ while ( !sr1.empty ()) {
+ string_ref::size_type pos = sr1.find_last_of(*p);
+ BOOST_CHECK ( pos == sr1.size () - 1 );
+ sr1.remove_suffix (1);
+ --p;
+ }
+ }
const char *test_strings [] = {
- "",
- "0",
- "abc",
- "adsfadadiaef;alkdg;aljt;j agl;sjrl;tjs;lga;lretj;srg[w349u5209dsfadfasdfasdfadsf",
- "abc\0asdfadsfasf",
- NULL
- };
-
+ "",
+ "0",
+ "abc",
+ "adsfadadiaef;alkdg;aljt;j agl;sjrl;tjs;lga;lretj;srg[w349u5209dsfadfasdfasdfadsf",
+ "abc\0asdfadsfasf",
+ NULL
+ };
+
int test_main( int , char* [] ) {
const char **p = &test_strings[0];
@@ -135,5 +135,5 @@
p++;
}
- return 0;
- }
+ return 0;
+ }
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