Commit 4b428ee5 by Paolo Carlini Committed by Paolo Carlini

assign.cc (test01): Add tests.

2001-12-16  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/assign.cc (test01): Add tests.

From-SVN: r48078
parent 3e037140
2001-12-16 Paolo Carlini <pcarlini@unitus.it>
* testsuite/21_strings/assign.cc (test01): Add tests.
2001-12-15 Paolo Carlini <pcarlini@unitus.it> 2001-12-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org> Nathan Myers <ncm@cantrip.org>
......
...@@ -37,6 +37,13 @@ test01() ...@@ -37,6 +37,13 @@ test01()
if (i != string::npos) if (i != string::npos)
aux.assign(aux, i + 1, string::npos); aux.assign(aux, i + 1, string::npos);
VERIFY(aux == "Hawaii"); 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) // assign(const basic_string& __str, size_type __pos, size_type __n)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment