// // test insertBefore() member function. // // assumes constructors work. // #include #include // has EXIT_SUCCESS #include "lstring.h" #include "testsub.h" // has functions for testing int main(void) { lstring empty; lstring abcdef("abcdef"); lstring b('b'); lstring ab("ab"); lstring bc("bc"); lstring ef("ef"); lstring xy("xy"); lstring bb("bb"); lstring bcdd("bcdd"); if (empty.find(b)) cout << "'b' found in ''\n"; if (abcdef.find(empty)) cout << "'' found in 'abcdef'\n"; if (abcdef.find(b)) cout << "'b' found in 'abcdef'\n"; if (abcdef.find(ab)) cout << "'ab' found in 'abcdef'\n"; if (abcdef.find(bc)) cout << "'bc' found in 'abcdef'\n"; if (abcdef.find(ef)) cout << "'ef' found in 'abcdef'\n"; if (abcdef.find(xy)) cout << "'xy' found in 'abcdef'\n"; if (abcdef.find(bb)) cout << "'bb' found in 'abcdef'\n"; if (abcdef.find(bcdd)) cout << "'bcdd' found in 'abcdef'\n"; cout << "That's all, folks!\n"; return EXIT_SUCCESS; }