提交 1b5d1596 编写于 作者: 邹晓航

修改测试

上级 75a7f57c
......@@ -17,11 +17,11 @@ namespace TinySTL{
assert(*cp3 == "hello");
assert(cp1.get() == cp2.get() && cp2.get() == cp3.get());
assert(cp1 == cp2 && !(cp2 != cp3));
*cp1 = "zouxiaohang";
assert(*cp1 == "zouxiaohang");
string zxh(" zouxiaohang");
cp1->append(zxh);
assert(*cp1 == "hello zouxiaohang");
assert(*cp2 == "hello" && *cp3 == "hello");
cow_ptr<string> cp4;
......@@ -37,9 +37,9 @@ namespace TinySTL{
assert(cp1 == cp2 && cp2 == cp3);
assert(*cp1 == *cp2 && *cp2 == *cp3 && *cp3 == "zouxiaohang");
cp2->append(" C++");//write
*cp2 = ("C++");//write
assert(*cp1 == *cp3 && *cp3 == "zouxiaohang");
assert(*cp2 == "zouxiaohang C++");
assert(*cp2 == "C++");
}
void testAllCases(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册