corretly show lines with multiple types of coverage

pull/725/head
ggrieco-tob 3 years ago
parent 65ecb1cb76
commit 0e3c05d56d
  1. 4
      lib/Echidna/Output/Source.hs

@ -10,7 +10,7 @@ import Data.Text (Text, pack, unpack)
import Data.Text.Encoding (decodeUtf8)
import Data.Text.IO (writeFile)
import Data.Time.Clock.System (getSystemTime, systemSeconds)
import Data.List (nub)
import Data.List (nub, sort)
import Text.Printf (printf)
import EVM.Solidity (SourceCache, SrcMap, SolcContract, sourceLines, sourceFiles, runtimeCode, runtimeSrcmap, creationSrcmap)
@ -57,7 +57,7 @@ markLines codeLines resultMap = V.map markLine (V.indexed codeLines)
where
markLine (i, codeLine) =
let results = fromMaybe [] (M.lookup (i+1) resultMap)
in pack $ printf "%-4s| %s" (getMarker <$> results) (unpack codeLine)
in pack $ printf "%-4s| %s" (sort $ nub $ getMarker <$> results) (unpack codeLine)
-- | Select the proper marker, according to the result of the transaction
getMarker :: TxResult -> Char

Loading…
Cancel
Save