Commit b496aa7c authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

changed fails to warnings for 3a and 3b

parent cd2cff70
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,16 @@ bool failExample(const char* testName, const string& msg,
    return false;
}

// helper function: consistent warning printing
bool warnExample(const char* testName,
                 const std::string& msg,
                 const std::string& expected,
                 const std::string& got) {
  std::cerr << "[" << testName << " WARNING] " << msg
            << ": expected " << expected << ", got " << got << "\n";
  return false;
}

bool test_0() {
    const char* T = "MaxPlanarSubgraph examples";

+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ bool test_0() {
        string expected = "ABCDEFG";

        if (got != expected)
            return failExample(T, "single read", expected, got);
            warnExample(T, "single read", expected, got);
    }

    {
+2 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ bool test_0() {
        string expected = "ABCDEFG";

        if (got != expected)
            return failExample(T, "single read", expected, got);
            warnExample(T, "single read", expected, got);
    }

    {
@@ -37,7 +37,7 @@ bool test_0() {
        string expected = "ABCDEFG";

        if (got != expected)
            return failExample(T, "simple overlap", expected, got);
            warnExample(T, "simple overlap", expected, got);
    }

    return true;