Loading tests/extraTestsProb1.cpp +33 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ int test_1d() { } float test_1e() { total = PROB_0E; int total = PROB_0E; setTotal(40); bool case0 = makeTotalQ(102, 8, 3, 43);//True 3 * 8 * 102 % 43 = 40 Loading @@ -146,6 +146,38 @@ float test_1e() { bool case4 = makeTotalQ(28, 2, 4, 0);// (28 / 2) * 4 + 0 = 56 bool case5 = makeTotalQ(28, 2, 4, 0);//False if(!case0){ cout << "-1: makeTotalQ(102, 8, 3, 43) = true(3 * 8 * 102 % 43 = 40), but your function returned makeTotalQ(102, 8, 3, 43) = false" << endl; total -= 1; } if(!case1){ cout << "-1: makeTotalQ(5, 4, 2, 0) = true(5 * 4 * 2 + 0 = 40), but your function returned makeTotalQ(5, 4, 2, 0) = false" << endl; total -= 1; } if(case2){ cout << "-1: makeTotalQ(5, 4, 2, 0) = false, but your function returned makeTotalQ(5, 4, 2, 0) = true" << endl; total -= 1; } if(!case3){ cout << "-2: makeTotalQ(1022, 8, 12, 1752) = true((12 * 8 * 1022) / 1752 = 24), but your function returned makeTotalQ(1022, 8, 12, 1752) = false" << endl; total -= 2; } if(!case4){ cout << "-2: makeTotalQ(28, 2, 4, 0) = true((28 / 2) * 4 + 0 = 56), but your function returned makeTotalQ(28, 2, 4, 0) = false" << endl; total -= 2; } if(case5){ cout << "-2: makeTotalQ(28, 2, 4, 0) = false, but your function returned makeTotalQ(28, 2, 4, 0) = true" << endl; total -= 2; } return total; Loading Loading
tests/extraTestsProb1.cpp +33 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ int test_1d() { } float test_1e() { total = PROB_0E; int total = PROB_0E; setTotal(40); bool case0 = makeTotalQ(102, 8, 3, 43);//True 3 * 8 * 102 % 43 = 40 Loading @@ -146,6 +146,38 @@ float test_1e() { bool case4 = makeTotalQ(28, 2, 4, 0);// (28 / 2) * 4 + 0 = 56 bool case5 = makeTotalQ(28, 2, 4, 0);//False if(!case0){ cout << "-1: makeTotalQ(102, 8, 3, 43) = true(3 * 8 * 102 % 43 = 40), but your function returned makeTotalQ(102, 8, 3, 43) = false" << endl; total -= 1; } if(!case1){ cout << "-1: makeTotalQ(5, 4, 2, 0) = true(5 * 4 * 2 + 0 = 40), but your function returned makeTotalQ(5, 4, 2, 0) = false" << endl; total -= 1; } if(case2){ cout << "-1: makeTotalQ(5, 4, 2, 0) = false, but your function returned makeTotalQ(5, 4, 2, 0) = true" << endl; total -= 1; } if(!case3){ cout << "-2: makeTotalQ(1022, 8, 12, 1752) = true((12 * 8 * 1022) / 1752 = 24), but your function returned makeTotalQ(1022, 8, 12, 1752) = false" << endl; total -= 2; } if(!case4){ cout << "-2: makeTotalQ(28, 2, 4, 0) = true((28 / 2) * 4 + 0 = 56), but your function returned makeTotalQ(28, 2, 4, 0) = false" << endl; total -= 2; } if(case5){ cout << "-2: makeTotalQ(28, 2, 4, 0) = false, but your function returned makeTotalQ(28, 2, 4, 0) = true" << endl; total -= 2; } return total; Loading