Cosmetic fixes

pull/456/head
Artur Cygan 5 years ago
parent 801b87662e
commit afbee60ddc
  1. 3
      lib/Echidna/UI/Report.hs
  2. 14
      lib/Echidna/UI/Widgets.hs

@ -92,9 +92,8 @@ ppCampaign c = do
testsPrinted <- ppTests c
gasInfoPrinted <- ppGasInfo c
let coveragePrinted = maybe "" ("\n" ++) . ppCoverage $ c ^. coverage
let seedPrinted = "Seed: " ++ show (c ^. genDict . defSeed)
pure $
testsPrinted
++ gasInfoPrinted
++ coveragePrinted
++ seedPrinted
++ "Seed: " ++ show (c ^. genDict . defSeed)

@ -20,7 +20,7 @@ import qualified Data.Text as T
import qualified Graphics.Vty as V
import qualified Paths_echidna (version)
import Echidna.ABI (GenDict(..))
import Echidna.ABI
import Echidna.Campaign (isDone)
import Echidna.Solidity
import Echidna.Types.Campaign
@ -65,16 +65,16 @@ campaignStatus (c@Campaign{_tests, _coverage, _ncallseqs}, uiState) = do
title = "Echidna " ++ showVersion Paths_echidna.version
summaryWidget :: Campaign -> Widget ()
summaryWidget Campaign{_tests, _coverage, _ncallseqs, _genDict} =
summaryWidget c =
padLeft (Pad 1) (
(if null _tests then
str ("No tests, benchmark mode. Number of call sequences: " ++ show _ncallseqs)
(if null (c ^. tests) then
str ("No tests, benchmark mode. Number of call sequences: " ++ show (c ^. ncallseqs))
else
str ("Tests found: " ++ show (length _tests)) <=>
str ("Seed: " ++ show (_defSeed _genDict))
str ("Tests found: " ++ show (length $ c ^. tests)) <=>
str ("Seed: " ++ show (c ^. genDict . defSeed))
)
<=>
maybe emptyWidget str (ppCoverage _coverage)
maybe emptyWidget str (ppCoverage $ c ^. coverage)
)
testsWidget :: (MonadReader x m, Has CampaignConf x, Has Names x, Has TxConf x)

Loading…
Cancel
Save