Project 3 Test Data

Project 3 Test Data - Project 3 Test Data There were 79...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 3 Test Data There were 79 test cases, each worth 0.9494 points. Each test case is represented by an assertion that must be true for you to pass that test. To run the test cases: Remove the main routine from your guitar.cpp file. Append the following text to the end of your guitar.cpp file, and build the resulting program. For any test case you wish to try, run the program, providing as input the test number. #include <iostream> #include <string> #include <cassert> using namespace std; bool isDanceWellFormed(string path); int translateDance(string dance, string& instructions, int& badBeat); void testone(int n) { string ins; int bb = 666; switch (n) { default: { cout << "Bad argument" << endl; } break; case 1: { assert(isSongWellFormed("")); } break; case 2: { assert(!isSongWellFormed("g")); } break; case 3: { assert(!isSongWellFormed("3")); } break; case 4: { assert(!isSongWellFormed("x")); } break; case 5: { assert(isSongWellFormed("/")); } break; case 6: { assert(isSongWellFormed("g/"));
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
} break; case 7: { assert(isSongWellFormed("r/")); } break; case 8: { assert(isSongWellFormed("y/")); } break; case 9: { assert(isSongWellFormed("b/")); } break; case 10: { assert(isSongWellFormed("o/")); } break; case 11: { assert(isSongWellFormed("G/")); } break; case 12: { assert(isSongWellFormed("R/")); } break; case 13: { assert(isSongWellFormed("Y/")); } break; case 14: { assert(isSongWellFormed("B/")); } break; case 15: { assert(isSongWellFormed("O/")); } break; case 16: {
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2009 for the course CS 31 taught by Professor Melkanoff during the Spring '00 term at UCLA.

Page1 / 6

Project 3 Test Data - Project 3 Test Data There were 79...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online