Commit 29da792d authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

fixed lab0p4 testing error

parent dae4d936
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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();
+2 −2
Original line number Diff line number Diff line
@@ -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)