Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include "bookpile.h"
- using namespace std;
- int main (){
- // The beginnings of a test plan
- // Create a new pile
- // ( expecting no output )
- cout << " Test 1: Create pile " << endl ;
- BookPile p;
- // Expecting a list of no items
- // ( expecting no output )
- cout << " Test 2: Empty listing " << endl ;
- p.ListAllBooks();
- // Adding an item
- // ( expecting no output )
- cout << " Test 3: Adding book " << endl ;
- Book b;
- b.title = " The C++ Standard Library ";
- b.author = " Alice Bobson ";
- p.AddBook (b) ;
- // Expect to see a list only containing
- // " The C++ Standard Library " by " Alice Bobson "
- cout << " Test 4: List books " << endl ;
- p.ListAllBooks () ;
- }
Advertisement
Add Comment
Please, Sign In to add comment