Skip to content
Snippets Groups Projects
Commit 29da792d authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

fixed lab0p4 testing error

parent dae4d936
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
void labZero_pThree();
/**
* @input read in four pairs of integral x y coordinates, one per line.
* @input read in four pairs of integral x y coordinates, one per line, in clock-wise order
* @output outputs the most specific description of the
* four points among the following choices:
* square, rectangle, trapezoid, rhombus, none of these
......@@ -25,15 +25,15 @@ void labZero_pThree();
* @example 1
* 0 0
* 0 1
* 1 0
* 1 1
* 1 0
* square
*
* @example 2
* 0 0
* 0 1
* 2 0
* 1 1
* 2 0
* trapezoid
*/
void labZero_pFour();
......
......@@ -70,14 +70,14 @@ bool test_labZero_pFour() {
string out;
// example 1
Common::redirIO("0 0\n0 1\n1 0\n1 1\n");
Common::redirIO("0 0\n0 1\n1 1\n1 0\n");
labZero_pFour();
out = Common::restoreIO();
if (out.find("square") == string::npos)
return false;
// example 2
Common::redirIO("0 0\n0 1\n2 0\n1 1\n");
Common::redirIO("0 0\n0 1\n1 1\n2 0\n");
labZero_pFour();
out = Common::restoreIO();
if (out.find("trapezoid") == string::npos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment