summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/testsuite/21_strings/assign.cc7
2 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ea411a9e828..d4d063f2373 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2001-12-16 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/21_strings/assign.cc (test01): Add tests.
+
2001-12-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
diff --git a/libstdc++-v3/testsuite/21_strings/assign.cc b/libstdc++-v3/testsuite/21_strings/assign.cc
index 1d7db1c16e4..fb1ec09b5a3 100644
--- a/libstdc++-v3/testsuite/21_strings/assign.cc
+++ b/libstdc++-v3/testsuite/21_strings/assign.cc
@@ -37,6 +37,13 @@ test01()
if (i != string::npos)
aux.assign(aux, i + 1, string::npos);
VERIFY(aux == "Hawaii");
+
+ aux = strlit;
+ i = aux.rfind("r/");
+ if (i != string::npos)
+ aux.assign(aux, i + 1, string::npos);
+ VERIFY(aux.c_str()[9] == 'B');
+ VERIFY(aux == "/Hanalei Bay/Kauai/Hawaii");
}
// assign(const basic_string& __str, size_type __pos, size_type __n)
OpenPOWER on IntegriCloud