-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug in prevGovActionId translation Fixed TestRep of Proposals Added generation timeout tests Bump cardano-ledger-executable-spec Fixed `OMap.assocList` Added Testable instance for `ImpTestM` Co-authored-by: Maximilian Algehed <MaximilianAlgehed@users.noreply.github.com> Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
- Loading branch information
Showing
27 changed files
with
842 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
libs/cardano-ledger-conformance/src/Test/Cardano/Ledger/Conformance/ConformanceSpec.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE TypeApplications #-} | ||
|
||
module Test.Cardano.Ledger.Conformance.ConformanceSpec (spec) where | ||
|
||
import Cardano.Ledger.Crypto (StandardCrypto) | ||
import Cardano.Ledger.Keys (KeyHash, KeyRole (..)) | ||
import Data.List (isInfixOf) | ||
import Test.Cardano.Ledger.Common | ||
import Test.Cardano.Ledger.Conformance (SpecTranslate (..), runSpecTransM) | ||
import Test.Cardano.Ledger.Conformance.Spec.Conway () | ||
import Test.Cardano.Ledger.Conformance.Utils (agdaHashToBytes) | ||
|
||
spec :: Spec | ||
spec = | ||
describe "Translation" $ do | ||
prop "Hashes are displayed in the same way in the implementation and in the spec" $ do | ||
someHash <- arbitrary @(KeyHash 'Staking StandardCrypto) | ||
let | ||
specRes = | ||
case runSpecTransM () (toTestRep someHash) of | ||
Left e -> error $ "Failed to translate hash: " <> show e | ||
Right x -> agdaHashToBytes x | ||
pure $ show specRes `isInfixOf` showExpr someHash |
Oops, something went wrong.