void test2(){ printf("[%s]--------\n", __PRETTY_FUNCTION__); SLL* ssl = new SLL(); ssl->append(1); ssl->append(2); ssl->append(3); ssl->print(); printf("---------------------------------\n"); }
void test3(){ printf("[%s]--------\n", __PRETTY_FUNCTION__); SLL* ssl = new SLL(); Node* n1 = new Node(1); Node* n2 = new Node(2); Node* n3 = new Node(3); ssl->append(n1); ssl->append(n2); ssl->append(n3); ssl->print(); printf("---------------------------------\n"); ssl->remove(n1); ssl->print(); printf("---------------------------------\n"); }
void test0() { begin(); SLL<int>* ddl = new SLL<int>(); ddl->append(new Node<int>(1)); int count = ddl->count(); printf("[%d]", count); delete ddl; }
void testCloneSLL1(){ printf("[%s]--------\n", __PRETTY_FUNCTION__); SLL* ssl = new SLL(); Node* n1 = new Node(1); Node* n2 = new Node(2); Node* n3 = new Node(3); ssl->append(n1); ssl->append(n2); ssl->append(n3); ssl->remove(n1); ssl->print(); printf("---------------------------------\n"); SLL* cll = new SLL(); cll->head = cloneSLL(ssl->head); cll->print(); printf("---------------------------------\n"); }