예제 #1
0
파일: stub.cpp 프로젝트: 3jackdaws/DoubleLL
void TestPurge(DoubleLinkedList<int> alist)
{
    DoubleLinkedList<int> blist;
    
    std::cout << "\n********** Testing: DoubleLinkedList Purge with Full List **********" << std::endl;
    
    std::cout << "\n********** Testing: Before Purge Full List **********" << std::endl;
    std::cout << alist.getHead() << std::endl;
    std::cout << alist.getTail() << std::endl;
    
    alist.Purge();
    
    std::cout << "\n********** Testing: After Purge Full List **********" << std::endl;
    std::cout << alist.getHead() << std::endl;
    std::cout << alist.getTail() << std::endl;
    
    std::cout << "\n********** Testing: DoubleLinkedList Purge with Empty List **********" << std::endl;
    std::cout << "\n********** Testing: Before Purge Empty List **********" << std::endl;
    std::cout << alist.getHead() << std::endl;
    std::cout << alist.getTail() << std::endl;
    
    alist.Purge();
    
    std::cout << "\n********** Testing: After Purge Empty List **********" << std::endl;
    std::cout << alist.getHead() << std::endl;
    std::cout << alist.getTail() << std::endl;
}
예제 #2
0
void TestPurge(DoubleLinkedList<int> alist)
{
	std::cout << "\n********** Purge **********" << std::endl;

	std::cout << alist.getHead() << std::endl;
	std::cout << alist.getTail() << std::endl;

	alist.Purge();

	std::cout << alist.getHead() << std::endl;
	std::cout << alist.getTail() << std::endl;
}