// // test append() member function. // // assumes constructors work. // // assumes lstring is implemented using a Seq as the first/only // member variable. // #include #include // has EXIT_SUCCESS #include "lstring.h" #include "testsub.h" // has functions for testing int main(void) { lstring empty1; lstring empty2; lstring x('x'); lstring wxyz("wxyz"); lstring abcdef("abcdef"); empty1.append(wxyz); printWithMsg("append 'wxyz' to '': ", empty1); wxyz.append(empty2); printWithMsg("append '' to 'wxyz': ", wxyz); wxyz.append(x); printWithMsg("append 'x' to previous result: ", wxyz); wxyz.append(abcdef); printWithMsg("append 'abcdef' to previous result: ", wxyz); cout << "That's all, folks!\n"; return EXIT_SUCCESS; }