aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@stanford.edu>2001-05-15 20:46:50 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2001-05-15 20:46:50 +0000
commit7edc73b46ae4ef8b29ddbfb2e6e81cff18987fec (patch)
tree5d88f577adb947c54c54e2f1248883927e01a195
parentc53c4afc0a194658e45e9e05a5da400df6c4d06d (diff)
downloadgcc-7edc73b46ae4ef8b29ddbfb2e6e81cff18987fec.zip
gcc-7edc73b46ae4ef8b29ddbfb2e6e81cff18987fec.tar.gz
gcc-7edc73b46ae4ef8b29ddbfb2e6e81cff18987fec.tar.bz2
inserters_extractors.cc, [...]: Replace multi-line string constants with C89-style concatenated string constants.
2001-05-15 Zack Weinberg <zackw@stanford.edu> * testsuite/21_strings/inserters_extractors.cc, testsuite/27_io/istream_unformatted.cc, testsuite/27_io/stringstream.cc: Replace multi-line string constants with C89-style concatenated string constants. From-SVN: r42116
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/testsuite/21_strings/inserters_extractors.cc5
-rw-r--r--libstdc++-v3/testsuite/27_io/istream_unformatted.cc58
-rw-r--r--libstdc++-v3/testsuite/27_io/stringstream.cc5
4 files changed, 42 insertions, 34 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2d903aa..6d68629 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-15 Zack Weinberg <zackw@stanford.edu>
+
+ * testsuite/21_strings/inserters_extractors.cc,
+ testsuite/27_io/istream_unformatted.cc,
+ testsuite/27_io/stringstream.cc:
+ Replace multi-line string constants with C89-style
+ concatenated string constants.
+
2001-05-14 Richard Henderson <rth@redhat.com>
* mknumeric_limits: Build with -fno-exceptions.
diff --git a/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc b/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc
index 261f572..c91fd25 100644
--- a/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc
+++ b/libstdc++-v3/testsuite/21_strings/inserters_extractors.cc
@@ -41,9 +41,8 @@ bool test01(void)
csize_type npos = std::string::npos;
csize_type csz01, csz02;
- // { dg-warning "string literals" "" { xfail *-*-* } 45 }
- const std::string str01("sailing grand traverse bay
- from Elk Rapids to the point reminds me of miles");
+ const std::string str01("sailing grand traverse bay\n"
+ "\t\t\t from Elk Rapids to the point reminds me of miles");
const std::string str02("sailing");
const std::string str03("grand");
const std::string str04("traverse");
diff --git a/libstdc++-v3/testsuite/27_io/istream_unformatted.cc b/libstdc++-v3/testsuite/27_io/istream_unformatted.cc
index fd88b9c..35b1d1f 100644
--- a/libstdc++-v3/testsuite/27_io/istream_unformatted.cc
+++ b/libstdc++-v3/testsuite/27_io/istream_unformatted.cc
@@ -142,11 +142,13 @@ test02()
typedef std::char_traits<char> traits_type;
bool test = true;
- // { dg-warning "string literals" "" { xfail *-*-* } 146 }
- const char str_lit01[] = " sun*ra
- and his myth science arkestra present
- angles and demons @ play
- the nubians of plutonia";
+ const char str_lit01[] = "\t\t\t sun*ra \n"
+ " "
+ "and his myth science arkestra present\n"
+ " "
+ "angles and demons @ play\n"
+ " "
+ "the nubians of plutonia";
std::string str01(str_lit01);
std::string strtmp;
@@ -201,8 +203,9 @@ test02()
VERIFY( is_04.gcount() == 64 );
VERIFY( state1 != state2 );
VERIFY( state2 == statefail );
- // { dg-warning "string literals" "" { xfail *-*-* } 205 }
- VERIFY( !traits_type::compare(" and his myth science arkestra presen", carray1, 65) );
+ VERIFY( !traits_type::compare(
+ " and his myth science arkestra presen",
+ carray1, 65) );
is_04.clear();
state1 = is_04.rdstate();
@@ -234,10 +237,11 @@ test03()
typedef std::char_traits<char> traits_type;
bool test = true;
- // { dg-warning "string literals" "" { xfail *-*-* } 238 }
- const char str_lit01[] = " sun*ra
- & his arkestra, featuring john gilmore:
- jazz in silhouette: images and forecasts of tomorrow";
+ const char str_lit01[] =
+ " sun*ra \n\t\t\t & his arkestra, featuring john gilmore: \n"
+ " "
+ "jazz in silhouette: images and forecasts of tomorrow";
+
std::string str01(str_lit01);
std::string strtmp;
@@ -360,23 +364,21 @@ test04()
int
test05()
{
- // { dg-warning "string literals" "" { xfail *-*-* } 364 }
- const char* charray = "
-a
-aa
-aaa
-aaaa
-aaaaa
-aaaaaa
-aaaaaaa
-aaaaaaaa
-aaaaaaaaa
-aaaaaaaaaa
-aaaaaaaaaaa
-aaaaaaaaaaaa
-aaaaaaaaaaaaa
-aaaaaaaaaaaaaa
-";
+ const char* charray = "\n"
+"a\n"
+"aa\n"
+"aaa\n"
+"aaaa\n"
+"aaaaa\n"
+"aaaaaa\n"
+"aaaaaaa\n"
+"aaaaaaaa\n"
+"aaaaaaaaa\n"
+"aaaaaaaaaa\n"
+"aaaaaaaaaaa\n"
+"aaaaaaaaaaaa\n"
+"aaaaaaaaaaaaa\n"
+"aaaaaaaaaaaaaa\n";
bool test = true;
const std::streamsize it = 5;
diff --git a/libstdc++-v3/testsuite/27_io/stringstream.cc b/libstdc++-v3/testsuite/27_io/stringstream.cc
index ed3ed83..8a841f2 100644
--- a/libstdc++-v3/testsuite/27_io/stringstream.cc
+++ b/libstdc++-v3/testsuite/27_io/stringstream.cc
@@ -48,9 +48,8 @@ test01()
VERIFY( len == 0 );
// Full string sanity check.
- // { dg-warning "string literals" "" { xfail *-*-* } 52 }
- std::string str02("these golden days, i spend waiting for you:\n
- Betty Carter on Verve with I'm Yours and You're Mine.");
+ std::string str02("these golden days, i spend waiting for you:\n"
+ "Betty Carter on Verve with I'm Yours and You're Mine.");
__i_start = str02.begin();
__i_end = str02.end();
len = str02.size();