Skip to content

Commit

Permalink
Coverage: Set hits to 0 instead of null if not executed
Browse files Browse the repository at this point in the history
  • Loading branch information
GDYendell committed Jan 24, 2017
1 parent 6d223db commit fc7375b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/CoverallsGenerateGcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ foreach (GCOV_FILE ${GCOV_FILES})
if (NOT ${LINE} EQUAL 0)

if (DO_SKIP)
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ")
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}0, ")
else()
# Translate the hitcount into valid JSON values.
if (${HITCOUNT} STREQUAL "#####" OR ${HITCOUNT} STREQUAL "=====")
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}0, ")
elseif (${HITCOUNT} STREQUAL "-")
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ")
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}0, ")
else()
set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}${HITCOUNT}, ")
endif()
Expand Down

0 comments on commit fc7375b

Please sign in to comment.