Public feed #381378

Mine

public text v1 · immutable
Raw Edit
·published 2007-03-04 20:29 UTC
rendered paste body
  void test24(){
    cout << "Test #24: SortedBag + 0 Boundary: addBook \t -- ";
    Book** books = new Book*[5];
    fillBooklist(books);
    SortedBag* usb = new SortedBag(10, books, 5);
    Book* animal = new Book("Animal Farm", "George Orwell", 111111111);
    Book* danger = new Book("Great Expectations", "Charles Dickens", 444444444);
    usb->addBook(animal);
    if (usb->getSize() == 6 && (usb->locate(danger) == 3)) {
      cout << "Passed" << endl;
    }
    else {
      cout << "Failed" << endl;
    }
    delete usb;
  }