Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- assertBool ∷ HasCallStack ⇒ String → Bool → Assertion
- assertEqual ∷ (Eq a, Show a, HasCallStack) ⇒ String → a → a → Assertion
- assertFailure ∷ HasCallStack ⇒ String → IO a
- assertFee ∷ HasCallStack ⇒ GYTxBody → Integer → Integer → IO ()
- assertThrown ∷ ∀ e a. Exception e ⇒ (e → Bool) → IO a → IO ()
- assertUserFunds ∷ Integer → Ctx → User → GYValue → IO ()
- isTxBodyErrorAutoBalance ∷ GYTxMonadException → Bool
Documentation
∷ HasCallStack | |
⇒ String | The message that is displayed if the assertion fails |
→ Bool | The condition |
→ Assertion |
Asserts that the specified condition holds.
∷ (Eq a, Show a, HasCallStack) | |
⇒ String | The message prefix |
→ a | The expected value |
→ a | The actual value |
→ Assertion |
Asserts that the specified actual value is equal to the expected value. The output message will contain the prefix, the expected value, and the actual value.
If the prefix is the empty string (i.e., ""
), then the prefix is omitted
and only the expected and actual values are output.
∷ HasCallStack | |
⇒ String | A message that is displayed with the assertion failure |
→ IO a |
Unconditionally signals that a failure has occured. All other assertions can be expressed with the form:
if conditionIsMet then return () else assertFailure msg