Skip to content

Commit b967f42

Browse files
iohk-bors[bot]newhoggyhamishmack
authored
Merge #3862
3862: Update index state to 2022-07-01T00:00:00Z r=newhoggy a=newhoggy Co-authored-by: John Ky <[email protected]> Co-authored-by: Hamish Mackenzie <[email protected]>
2 parents 42809ad + 15cd88d commit b967f42

File tree

24 files changed

+3330
-889
lines changed

24 files changed

+3330
-889
lines changed

Diff for: bench/locli/src/Cardano/Analysis/Chain.hs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{-# LANGUAGE GeneralizedNewtypeDeriving#-}
2-
{-# OPTIONS_GHC -Wno-deprecations -Wno-orphans #-}
2+
3+
{-# OPTIONS_GHC -Wno-orphans #-}
4+
35
{- HLINT ignore "Use head" -}
6+
47
module Cardano.Analysis.Chain (module Cardano.Analysis.Chain) where
58

69
import Cardano.Prelude hiding (head)

Diff for: bench/locli/src/Cardano/Analysis/ChainFilter.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{-# LANGUAGE DeriveAnyClass #-}
22
{-# LANGUAGE StrictData #-}
3-
{-# OPTIONS_GHC -Wno-deprecations -Wno-orphans #-}
3+
44
{- HLINT ignore "Use head" -}
5+
56
module Cardano.Analysis.ChainFilter (module Cardano.Analysis.ChainFilter) where
67

78
import Cardano.Prelude hiding (head)

Diff for: cabal.project

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- run `nix flake lock --update-input hackageNix` after updating index-state.
2-
index-state: 2022-02-18T00:00:00Z
2+
index-state: 2022-07-01T00:00:00Z
33

44
packages:
55
cardano-api
@@ -227,8 +227,8 @@ source-repository-package
227227
source-repository-package
228228
type: git
229229
location: https://github.com/input-output-hk/cardano-prelude
230-
tag: bb4ed71ba8e587f672d06edf9d2e376f4b055555
231-
--sha256: 00h10l5mmiza9819p9v5q5749nb9pzgi20vpzpy1d34zmh6gf1cj
230+
tag: c7fc9fba236972c27a55e0f3d34c2758cf616bfc
231+
--sha256: 0sg1hhnifqxfc5n5f9ikbxyrjlg77hynbhsql0h4smqniw29dbwk
232232
subdir:
233233
cardano-prelude
234234
cardano-prelude-test
@@ -339,6 +339,8 @@ constraints:
339339
-- that dependency
340340
, network >= 3.1.1.0
341341
, HSOpenSSL >= 0.11.7.2
342+
, algebraic-graphs < 0.7
343+
, protolude < 0.3.1
342344

343345
package snap-server
344346
flags: +openssl

Diff for: cardano-api/cardano-api.cabal

-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ test-suite cardano-api-test
217217
, tasty
218218
, tasty-hedgehog
219219
, tasty-quickcheck
220-
, tasty-th
221220
, time
222221

223222
other-modules: Test.Cardano.Api.Crypto

Diff for: cardano-api/test/Test/Cardano/Api/Json.hs

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
{-# LANGUAGE FlexibleContexts #-}
22
{-# LANGUAGE GADTs #-}
33
{-# LANGUAGE LambdaCase #-}
4-
{-# LANGUAGE TemplateHaskell #-}
54

65
module Test.Cardano.Api.Json
76
( tests
87
) where
98

9+
import Cardano.Api.Orphans ()
10+
import Cardano.Api.Shelley
1011
import Cardano.Prelude
11-
1212
import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON), eitherDecode, encode)
1313
import Data.Aeson.Types (Parser, parseEither)
14-
import Hedgehog (Property, forAll, tripping)
15-
import qualified Hedgehog as H
16-
import Test.Tasty (TestTree)
17-
import Test.Tasty.Hedgehog (testProperty)
18-
import Test.Tasty.TH (testGroupGenerator)
19-
20-
import Cardano.Api
21-
import Cardano.Api.Orphans ()
22-
import Cardano.Api.Shelley
2314
import Gen.Cardano.Api (genAlonzoGenesis)
2415
import Gen.Cardano.Api.Typed
16+
import Hedgehog (Property, forAll, tripping)
17+
import Test.Tasty (TestTree, testGroup)
18+
import Test.Tasty.Hedgehog (testPropertyNamed)
19+
20+
import qualified Hedgehog as H
2521

2622
{- HLINT ignore "Use camelCase" -}
2723

@@ -87,4 +83,13 @@ prop_json_roundtrip_scriptdata_detailed_json = H.property $ do
8783
tripping sData scriptDataToJsonDetailedSchema scriptDataFromJsonDetailedSchema
8884

8985
tests :: TestTree
90-
tests = $testGroupGenerator
86+
tests = testGroup "Test.Cardano.Api.Json"
87+
[ testPropertyNamed "json roundtrip alonzo genesis" "json roundtrip alonzo genesis" prop_json_roundtrip_alonzo_genesis
88+
, testPropertyNamed "json roundtrip utxo" "json roundtrip utxo" prop_json_roundtrip_utxo
89+
, testPropertyNamed "json roundtrip reference scripts" "json roundtrip reference scripts" prop_json_roundtrip_reference_scripts
90+
, testPropertyNamed "json roundtrip txoutvalue" "json roundtrip txoutvalue" prop_json_roundtrip_txoutvalue
91+
, testPropertyNamed "json roundtrip txout tx context" "json roundtrip txout tx context" prop_json_roundtrip_txout_tx_context
92+
, testPropertyNamed "json roundtrip txout utxo context" "json roundtrip txout utxo context" prop_json_roundtrip_txout_utxo_context
93+
, testPropertyNamed "json roundtrip eraInMode" "json roundtrip eraInMode" prop_json_roundtrip_eraInMode
94+
, testPropertyNamed "json roundtrip scriptdata detailed json" "json roundtrip scriptdata detailed json" prop_json_roundtrip_scriptdata_detailed_json
95+
]

Diff for: cardano-api/test/Test/Cardano/Api/KeysByron.hs

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
{-# LANGUAGE FlexibleContexts #-}
2-
{-# LANGUAGE TemplateHaskell #-}
32

43
module Test.Cardano.Api.KeysByron
54
( tests
65
) where
76

8-
import Cardano.Prelude
9-
7+
import Cardano.Api (AsType(AsByronKey, AsSigningKey), Key(deterministicSigningKey))
8+
import Cardano.Prelude ((<$>))
9+
import Gen.Hedgehog.Roundtrip.CBOR (roundtrip_CBOR)
1010
import Hedgehog (Property)
1111
import Test.Cardano.Api.Typed.Orphans ()
12-
import Test.Tasty (TestTree)
13-
import Test.Tasty.Hedgehog (testProperty)
14-
import Test.Tasty.TH (testGroupGenerator)
12+
import Test.Tasty (TestTree, testGroup)
13+
import Test.Tasty.Hedgehog (testPropertyNamed)
1514

16-
import Cardano.Api
1715
import qualified Gen.Cardano.Crypto.Seed as Gen
18-
import Gen.Hedgehog.Roundtrip.CBOR (roundtrip_CBOR)
1916

2017
{- HLINT ignore "Use camelCase" -}
2118

@@ -24,4 +21,6 @@ prop_roundtrip_byron_key_CBOR =
2421
roundtrip_CBOR (AsSigningKey AsByronKey) (deterministicSigningKey AsByronKey <$> Gen.genSeedForKey AsByronKey)
2522

2623
tests :: TestTree
27-
tests = $testGroupGenerator
24+
tests = testGroup "Test.Cardano.Api.KeysByron"
25+
[ testPropertyNamed "roundtrip byron key CBOR" "roundtrip byron key CBOR" prop_roundtrip_byron_key_CBOR
26+
]

Diff for: cardano-api/test/Test/Cardano/Api/Ledger.hs

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
{-# LANGUAGE StandaloneDeriving #-}
2-
{-# LANGUAGE TemplateHaskell #-}
31
{-# LANGUAGE TypeApplications #-}
42

53
module Test.Cardano.Api.Ledger
64
( tests
75
) where
86

9-
import Cardano.Prelude
10-
11-
import Hedgehog (Property)
12-
import qualified Hedgehog as H
13-
import qualified Hedgehog.Extras.Aeson as H
14-
import Test.Tasty (TestTree)
15-
import Test.Tasty.Hedgehog (testProperty)
16-
import Test.Tasty.TH (testGroupGenerator)
17-
187
import Cardano.Ledger.Address (deserialiseAddr, serialiseAddr)
8+
import Cardano.Prelude (($))
9+
import Hedgehog (Property)
1910
import Ouroboros.Consensus.Shelley.Eras (StandardCrypto)
20-
import Test.Cardano.Api.Genesis
11+
import Test.Cardano.Api.Genesis (exampleShelleyGenesis)
2112
import Test.Cardano.Ledger.Shelley.Serialisation.Generators.Genesis (genAddress)
13+
import Test.Tasty (TestTree, testGroup)
14+
import Test.Tasty.Hedgehog (testPropertyNamed)
15+
16+
import qualified Hedgehog as H
17+
import qualified Hedgehog.Extras.Aeson as H
2218

2319
prop_golden_ShelleyGenesis :: Property
2420
prop_golden_ShelleyGenesis = H.goldenTestJsonValuePretty exampleShelleyGenesis "test/Golden/ShelleyGenesis"
@@ -35,4 +31,7 @@ prop_roundtrip_Address_CBOR = H.property $ do
3531
-- -----------------------------------------------------------------------------
3632

3733
tests :: TestTree
38-
tests = $testGroupGenerator
34+
tests = testGroup "Test.Cardano.Api.Ledger"
35+
[ testPropertyNamed "golden ShelleyGenesis" "golden ShelleyGenesis" prop_golden_ShelleyGenesis
36+
, testPropertyNamed "roundtrip Address CBOR" "roundtrip Address CBOR" prop_roundtrip_Address_CBOR
37+
]

Diff for: cardano-api/test/Test/Cardano/Api/Metadata.hs

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
{-# LANGUAGE OverloadedStrings #-}
2-
{-# LANGUAGE TemplateHaskell #-}
2+
33
module Test.Cardano.Api.Metadata
44
( tests
55
, genTxMetadata
66
, genTxMetadataValue
77
) where
88

9+
import Cardano.Api
910
import Cardano.Prelude
11+
import Gen.Cardano.Api.Metadata
12+
import Hedgehog (Property, property, (===))
13+
import Test.Tasty (TestTree, testGroup)
14+
import Test.Tasty.Hedgehog (testPropertyNamed)
1015

1116
import qualified Data.Aeson as Aeson
1217
import qualified Data.Map.Strict as Map
13-
import Hedgehog (Property, property, (===))
1418
import qualified Hedgehog
15-
import Test.Tasty (TestTree)
16-
import Test.Tasty.Hedgehog (testProperty)
17-
import Test.Tasty.TH (testGroupGenerator)
18-
19-
import Cardano.Api
20-
import Gen.Cardano.Api.Metadata
2119

2220
-- ----------------------------------------------------------------------------
2321
-- Golden / unit tests
@@ -123,4 +121,16 @@ prop_metadata_roundtrip_via_schema_json = Hedgehog.property $ do
123121
--
124122

125123
tests :: TestTree
126-
tests = $testGroupGenerator
124+
tests = testGroup "Test.Cardano.Api.Metadata"
125+
[ testPropertyNamed "golden 1" "golden 1" prop_golden_1
126+
, testPropertyNamed "golden 2" "golden 2" prop_golden_2
127+
, testPropertyNamed "golden 3" "golden 3" prop_golden_3
128+
, testPropertyNamed "golden 4" "golden 4" prop_golden_4
129+
, testPropertyNamed "golden 5" "golden 5" prop_golden_5
130+
, testPropertyNamed "golden 6" "golden 6" prop_golden_6
131+
, testPropertyNamed "golden 7" "golden 7" prop_golden_7
132+
, testPropertyNamed "golden 8" "golden 8" prop_golden_8
133+
, testPropertyNamed "noschema json roundtrip via metadata" "noschema json roundtrip via metadata" prop_noschema_json_roundtrip_via_metadata
134+
, testPropertyNamed "schema json roundtrip via metadata" "schema json roundtrip via metadata" prop_schema_json_roundtrip_via_metadata
135+
, testPropertyNamed "metadata roundtrip via schema json" "metadata roundtrip via schema json" prop_metadata_roundtrip_via_schema_json
136+
]

Diff for: cardano-api/test/Test/Cardano/Api/Typed/Address.hs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
{-# LANGUAGE FlexibleContexts #-}
2-
{-# LANGUAGE TemplateHaskell #-}
32

43
module Test.Cardano.Api.Typed.Address
54
( tests
65
) where
76

8-
import Cardano.Prelude
9-
10-
import Hedgehog (Property)
11-
import qualified Hedgehog as H
12-
import Test.Tasty (TestTree)
13-
import Test.Tasty.Hedgehog (testProperty)
14-
import Test.Tasty.TH (testGroupGenerator)
15-
167
import Cardano.Api
17-
import Gen.Cardano.Api.Typed
8+
import Cardano.Prelude (($), Eq, Show)
9+
import Gen.Cardano.Api.Typed (genAddressByron, genAddressShelley)
10+
import Hedgehog (Property)
1811
import Test.Cardano.Api.Typed.Orphans ()
12+
import Test.Tasty (TestTree, testGroup)
13+
import Test.Tasty.Hedgehog (testPropertyNamed)
14+
15+
import qualified Hedgehog as H
1916

2017
{- HLINT ignore "Use camelCase" -}
2118

@@ -46,4 +43,7 @@ roundtrip_serialise_address asType g =
4643
-- -----------------------------------------------------------------------------
4744

4845
tests :: TestTree
49-
tests = $testGroupGenerator
46+
tests = testGroup "Test.Cardano.Api.Typed.Address"
47+
[ testPropertyNamed "roundtrip shelley address" "roundtrip shelley address" prop_roundtrip_shelley_address
48+
, testPropertyNamed "roundtrip byron address" "roundtrip byron address" prop_roundtrip_byron_address
49+
]

Diff for: cardano-api/test/Test/Cardano/Api/Typed/Bech32.hs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
{-# LANGUAGE TemplateHaskell #-}
21
module Test.Cardano.Api.Typed.Bech32
32
( tests
43
) where
54

6-
import Hedgehog (Property)
7-
import Test.Tasty (TestTree)
8-
import Test.Tasty.Hedgehog (testProperty)
9-
import Test.Tasty.TH (testGroupGenerator)
10-
11-
import Cardano.Api
12-
import Gen.Cardano.Api.Typed
5+
import Cardano.Api (AsType(AsStakeAddress, AsShelleyAddress))
6+
import Gen.Cardano.Api.Typed( genAddressShelley, genStakeAddress)
137
import Gen.Hedgehog.Roundtrip.Bech32 (roundtrip_Bech32)
8+
import Hedgehog (Property)
9+
import Test.Tasty (TestTree, testGroup)
10+
import Test.Tasty.Hedgehog (testPropertyNamed)
1411

1512
prop_roundtrip_Address_Shelley :: Property
1613
prop_roundtrip_Address_Shelley = roundtrip_Bech32 AsShelleyAddress genAddressShelley
@@ -19,4 +16,7 @@ prop_roundtrip_StakeAddress :: Property
1916
prop_roundtrip_StakeAddress = roundtrip_Bech32 AsStakeAddress genStakeAddress
2017

2118
tests :: TestTree
22-
tests = $testGroupGenerator
19+
tests = testGroup "Test.Cardano.Api.Typed.Bech32"
20+
[ testPropertyNamed "roundtrip Address Shelley" "roundtrip Address Shelley" prop_roundtrip_Address_Shelley
21+
, testPropertyNamed "roundtrip StakeAddress" "roundtrip StakeAddress" prop_roundtrip_StakeAddress
22+
]

0 commit comments

Comments
 (0)