Skip to content

Commit

Permalink
Merge pull request #84 from 0x7CFE/fix/increase_code_coverage
Browse files Browse the repository at this point in the history
Increases code coverage, adds more tests, fixes some bugs
  • Loading branch information
kpp committed Aug 3, 2015
2 parents de1c041 + 35e0f81 commit 657f8b2
Show file tree
Hide file tree
Showing 28 changed files with 1,735 additions and 609 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ os:

sudo: false
cache:
- apt
- pip
apt: true
directories:
- $HOME/.cache/pip
addons:
apt:
packages:
Expand Down Expand Up @@ -41,7 +42,7 @@ env:
- USE_LLVM=Off
BUILD_TYPE=Coverage

install:
before_install:
- pip install --user cpp-coveralls

before_script:
Expand All @@ -50,8 +51,8 @@ before_script:
- cmake .. -DUSE_LLVM=$USE_LLVM -DBUILD_TESTS=On -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSITE="${TRAVIS_OS_NAME}@Travis" -DBUILDNAME="${TRAVIS_BRANCH}_${CXX}_LLVM_${USE_LLVM}_${BUILD_TYPE}"

script:
- ctest -M Experimental -T Start -T Build -T Test -T Submit
- cmake --build . -- all --keep-going && cmake --build . --target check # If ctest built the project unsuccessfully, `make all && make check` will report errors to Travis
- cmake --build . -- all --keep-going
- cmake --build . --target check

after_success:
- if [ ${CXX} == g++ ] && [ ${BUILD_TYPE} == Coverage ]; then ~/.local/bin/coveralls --repo_token "INxVunXhVXbQWjVbwoIisKeXSJqCRGnI2" --exclude build/tests/gtest -E ".*CMake.*CompilerId.c" --gcov-options "\-lp" -r ../; fi
8 changes: 5 additions & 3 deletions include/analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ class ControlGraph {
nodes_iterator nodes_end() { return m_nodes.end(); }

ControlNode* newNode(ControlNode::TNodeType type) {
assert(type == ControlNode::ntInstruction
|| type == ControlNode::ntPhi
|| type == ControlNode::ntTau
);

ControlNode* node = 0;

switch (type) {
Expand All @@ -355,9 +360,6 @@ class ControlGraph {
case ControlNode::ntTau:
node = new TauNode(m_lastNodeIndex);
break;

default:
assert(false);
}

m_lastNodeIndex++;
Expand Down
Loading

0 comments on commit 657f8b2

Please sign in to comment.