Skip to content

Commit 25d9af4

Browse files
committed
Remove pointless garbage-bytes deserialisation property
1 parent 48ae45a commit 25d9af4

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
@@ -86,9 +86,6 @@ tests =
8686
[ testProperty
8787
"Roundtrip serialiseToCBOR/deserialiseFromCBOR AnyScript"
8888
prop_roundtrip_cbor_any_script
89-
, testProperty
90-
"Deserialising garbage bytes returns Left"
91-
prop_deserialise_garbage_bytes_returns_left
9289
]
9390
, testGroup
9491
"calcMinFeeRecursive"
@@ -124,15 +121,6 @@ prop_roundtrip_cbor_any_script = H.property $ do
124121
script <- H.forAll genAnyScript
125122
H.tripping script Api.serialiseToCBOR (Api.deserialiseFromCBOR Exp.AsAnyScript)
126123

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

137125
prop_created_transaction_with_both_apis_are_the_same :: Property
138126
prop_created_transaction_with_both_apis_are_the_same = H.propertyOnce $ do

0 commit comments

Comments
 (0)