EECS448:Lab6

From ITTC
Jump to: navigation, search


Navigation
Home
Information

Syllabus
Schedule

Classwork

Labs
Projects

Due Time

This will be due a week from the beginning of your lab section.

Overview

This lab is to give you practice doing some unit testing. Your objective is the following:

  • Read the documentation for the provided Queue Interface and Queue implementation
    • Note, my Queue Implementation is NOT templated. It only contains ints
  • Create a test class that will have as many methods as you see fit to verify, using tests, that the Queue satisfies the requirements of being a Queue
    • In other words, it fulfills the promises made in its documentation

Provided Files

Exercise: Bug Hunt!

  1. I've taken the liberty of obfuscating the cpp file and only provided a .o file of the Queue class
  2. Create a Test class that verifies the preconditions, postconditions, and return values of all methods as described in the header
  3. Create a buglist.txt that contains your best guesses at to what the the purposely inserted bugs are

Hints

  • The purposely inserted bugs may cause other things that are coded properly appear not to behave properly
    • Your test class will verify what works and doesn't work, but you will use your programmer cunning to ascertain what the purposely inserted bugs are
  • The TAs do not know what the bugs are

Plagiarism

I realize I've given test code in past courses. You need to write your own tests from scratch. If you try to turn in my code for your lab it will be considered an act of academic misconduct, will give you an F for the course, and will petition to you removed from the School of Engineering. In other words, do not plagiarize me nor anyone else. If your write tests from scratch that perform a similar function to mine, that's fine. But you must be the author.

Rubric

  • [70pts] Test class the demonstrates what the Queue can/cannot do
    • Every test displays to terminal or write to file a well formatted test
    • The tests are automatically run when the program starts
  • [30pts] Finding the purposely inserted bugs bugs


Example test output:

Test 1: Newly created Queue is empty: PASSED
Test 2: Enqueing a value makes the Queue not empty: PASSED
Test 3: Enqueue 5 on empty queue then peekFront returns 5: PASSED

Of course, you'll have multiple tests per method.