Trying to fix MString assignments.
This commit is contained in:
1 parent
74ab316e64
commit
d020363bc9
12 files changed
+75
-16
No files matched your search
@@ -19,7 +19,7 @@ int main(int argc, char **argv) {
|
||||
coreutils::MString ytest("this is a test");
|
||||
xtest = ytest;
|
||||
std::cout << "assign mstring to mstring: " << xtest << std::endl;
|
||||
|
||||
|
||||
// Character assignment tests.
|
||||
coreutils::MString test3;
|
||||
test3 = 'a';
|
||||
@@ -29,6 +29,7 @@ int main(int argc, char **argv) {
|
||||
coreutils::MString test4;
|
||||
test4 << "this is a test." << test7;
|
||||
std::cout << "char* operator<<: [" << test4 << "]." << std::endl;
|
||||
|
||||
test4 << "another test " << 75;
|
||||
std::cout << "char* operator<<: [" << test4 << "]." << std::endl;
|
||||
|
||||
@@ -43,7 +44,7 @@ int main(int argc, char **argv) {
|
||||
std::cout << "streaming from std::string: [" << test14 << "]." << std::endl;
|
||||
|
||||
coreutils::MString test9("XXXXXXXXXYYYYYYYYYY");
|
||||
std::cout << "test insert: " << test9 << std::endl;
|
||||
std::cout << "test insert: " << test9 << std::endl;
|
||||
coreutils::MString test8("zzz");
|
||||
test9.insert(test8, 9);
|
||||
test9.insert("aaaaa", 9);
|
||||
@@ -64,10 +65,18 @@ int main(int argc, char **argv) {
|
||||
coreutils::MString test21;
|
||||
test21 = test20;
|
||||
std::cout << "mstring = zstring: [" << test21 << "]" << std::endl;
|
||||
|
||||
coreutils::MString test22;
|
||||
test22 << test20;
|
||||
std::cout << "mstring << zstring: [" << test22 << "]" << std::endl;
|
||||
|
||||
|
||||
std::string test23 = "this is a string";
|
||||
test22 = test23;
|
||||
std::cout << "mstring = string: [" << test22 << "]" << std::endl;
|
||||
|
||||
test22 << test23;
|
||||
std::cout << "mstring << string: [" << test22 << "]" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user