Loading problems/LabZero_ChapterThree.h +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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(); Loading tests/LabZero.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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) Loading Loading
problems/LabZero_ChapterThree.h +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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(); Loading
tests/LabZero.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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) Loading