Skip to content

Commit 7a76968

Browse files
committed
Remove pointless garbage-bytes deserialisation property
1 parent a2c88df commit 7a76968

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

cardano-api/test/cardano-api-test/Test/Cardano/Api/Experimental.hs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ tests =
8484
[ testProperty
8585
"Roundtrip serialiseToCBOR/deserialiseFromCBOR AnyScript"
8686
prop_roundtrip_cbor_any_script
87-
, testProperty
88-
"Deserialising garbage bytes returns Left"
89-
prop_deserialise_garbage_bytes_returns_left
9087
]
9188
, testGroup
9289
"calcMinFeeRecursive"
@@ -122,15 +119,6 @@ prop_roundtrip_cbor_any_script = H.property $ do
122119
script <- H.forAll genAnyScript
123120
H.tripping script Api.serialiseToCBOR (Api.deserialiseFromCBOR Exp.AsAnyScript)
124121

125-
-- | Deserialising random garbage bytes should always return 'Left'.
126-
prop_deserialise_garbage_bytes_returns_left :: Property
127-
prop_deserialise_garbage_bytes_returns_left = H.property $ do
128-
garbage <- H.forAll $ Gen.bytes (Range.linear 0 128)
129-
case Api.deserialiseFromCBOR
130-
(Exp.AsAnyScript :: Exp.AsType (Exp.AnyScript (Exp.LedgerEra Exp.ConwayEra)))
131-
garbage of
132-
Left _ -> H.success
133-
Right _ -> H.annotate "Expected deserialisation failure but got Right" >> H.failure
134122

135123
prop_created_transaction_with_both_apis_are_the_same :: Property
136124
prop_created_transaction_with_both_apis_are_the_same = H.propertyOnce $ do

0 commit comments

Comments
 (0)