Skip to content

Commit

Permalink
Small code coverage improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
  • Loading branch information
burgholzer committed Jan 19, 2021
1 parent ffddbfb commit 3605849
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ignore:
- "test/**/*"
- "extern/**/*"

coverage:
range: 60..95
precision: 1
6 changes: 3 additions & 3 deletions .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ path_classifiers:
- scripts
library:
- extern/qfr/extern/dd_package/extern/googletest
- extern/json
- extern/pybind11
- extern/pybind11_json
- extern/qfr/extern/json
- extern/qfr/extern/pybind11
- extern/qfr/extern/pybind11_json

extraction:
cpp:
Expand Down
16 changes: 10 additions & 6 deletions test/test_journal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "gtest/gtest.h"
#include "PowerOfSimulationEquivalenceChecker.hpp"
#include "ImprovedDDEquivalenceChecker.hpp"
#include "CompilationFlowEquivalenceChecker.hpp"

class JournalTestNonEQ: public testing::TestWithParam<std::tuple<std::string, unsigned short>> {
protected:
Expand Down Expand Up @@ -202,16 +201,16 @@ class JournalTestEQ : public testing::TestWithParam<std::string> {

std::string transpiled_file{};

int timeout = 50;
int timeout = 5;

void SetUp() override {
std::stringstream ss{};
ss << test_transpiled_dir << GetParam() << "_transpiled.";
if (GetParam() == "add6_196" || GetParam() == "cm150a_210") {
ss << "real";
} else {
// if (GetParam() == "add6_196" || GetParam() == "cm150a_210") {
// ss << "real";
// } else {
ss << "qasm";
}
// }
transpiled_file = ss.str();
}
};
Expand Down Expand Up @@ -262,6 +261,7 @@ TEST_P(JournalTestEQ, EQReference) {
}

equivalenceChecker.printCSVEntry();
equivalenceChecker.printResult();
EXPECT_TRUE(equivalenceChecker.results.timeout || equivalenceChecker.results.consideredEquivalent());
}

Expand All @@ -281,6 +281,7 @@ TEST_P(JournalTestEQ, EQNaive) {
}

equivalenceChecker.printCSVEntry();
equivalenceChecker.printResult();
EXPECT_TRUE(equivalenceChecker.results.timeout || equivalenceChecker.results.consideredEquivalent());
}

Expand All @@ -300,6 +301,7 @@ TEST_P(JournalTestEQ, EQProportional) {
}

equivalenceChecker.printCSVEntry();
equivalenceChecker.printResult();
EXPECT_TRUE(equivalenceChecker.results.timeout || equivalenceChecker.results.consideredEquivalent());
}

Expand All @@ -319,6 +321,7 @@ TEST_P(JournalTestEQ, EQLookahead) {
}

equivalenceChecker.printCSVEntry();
equivalenceChecker.printResult();
EXPECT_TRUE(equivalenceChecker.results.timeout || equivalenceChecker.results.consideredEquivalent());
}

Expand All @@ -338,5 +341,6 @@ TEST_P(JournalTestEQ, EQPowerOfSimulation) {
}

equivalenceChecker.printCSVEntry();
equivalenceChecker.printResult();
EXPECT_TRUE(equivalenceChecker.results.timeout || equivalenceChecker.results.consideredEquivalent());
}

0 comments on commit 3605849

Please sign in to comment.