diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 20:21:20 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 20:21:20 +0000 |
commit | 028b4a6a87fb89264123e9af2d26ac96bde98ae5 (patch) | |
tree | 53b7dd053b9432fc016a150212ff19a20e01cff3 /libstdc++-v3 | |
parent | 29ab1dcc79e901a59ecfd766bb90cdfc2bd91848 (diff) | |
download | ppe42-gcc-028b4a6a87fb89264123e9af2d26ac96bde98ae5.tar.gz ppe42-gcc-028b4a6a87fb89264123e9af2d26ac96bde98ae5.zip |
2001-12-16 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/assign.cc (test01): Add tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/assign.cc | 7 |
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) |