Skip to content

Conversation

@hrajchert
Copy link
Collaborator

This PR updates the test spec driver and the documentation on how to update it.

'github:input-output-hk/marlowe/d89a7127581315d76206516bf81c2e7a5c7c3b4f' (2023-03-22)
  → 'github:input-output-hk/marlowe/6fa08b1fc3983772b805130e8e55386fe7228bde' (2023-05-10)

The result of calling marlowe-test now is:

Local tests
JsonStream » createJsonStream
  ✓︎ should finish after the stream is done
  ✓︎ should call onJson on a valid json
  ✓︎ should call onJson on a valid json with newlines
  ✓︎ should discard characters before the begin separator
  ✓︎ should discard characters after the end separator
  ✓︎ should throw onError on invalid json
  ✓︎ should recover after error
  ✓︎ should discard interrupted entries
  ✓︎ should not fail when just receiving the begin separator
  ✓︎ should increase the buffer size when needed
  ✓︎ should work with data in multiple chunks

Summary
11/11 tests passed

Marlowe Spec tests
Marlowe
  Core
    Json Serialization
      Examples
        Bound example:                                           OK (0.68s)
        Value examples
          Constant:                                              OK
          Interval start:                                        OK
          Interval end:                                          OK
          Add:                                                   OK
          Sub:                                                   OK
          Mul:                                                   OK
          Div:                                                   OK
          Negate:                                                OK
          Use:                                                   OK
          Cond:                                                  OK
          Invalid value:                                         OK
        Observation examples
          True:                                                  OK
          False:                                                 OK
          And:                                                   OK
          Or:                                                    OK
          Not:                                                   OK
          Value GE:                                              OK
          Value GT:                                              OK
          Value LT:                                              OK
          Value LE:                                              OK
          Value EQ:                                              OK
          Invalid observation:                                   OK
        Invalid type:                                            OK
      Arbitrary
        Token:                                                   OK (1.50s)
          +++ OK, passed 100 tests.
        Party:                                                   OK (0.98s)
          +++ OK, passed 100 tests.
        Payee:                                                   OK (0.95s)
          +++ OK, passed 100 tests.
        ChoiceId:                                                OK (0.90s)
          +++ OK, passed 100 tests.
        Bound:                                                   OK (0.03s)
          +++ OK, passed 100 tests.
        Value:                                                   OK (0.54s)
          +++ OK, passed 100 tests.
        Observation:                                             OK (0.51s)
          +++ OK, passed 100 tests.
        Action:                                                  OK (0.48s)
          +++ OK, passed 100 tests.
        Contract:                                                OK (0.38s)
          +++ OK, passed 100 tests.
        Input:                                                   OK (0.85s)
          +++ OK, passed 100 tests.
        Transaction:                                             OK (0.93s)
          +++ OK, passed 100 tests.
        Payment:                                                 OK (1.16s)
          +++ OK, passed 100 tests.
        State:                                                   OK (1.15s)
          +++ OK, passed 100 tests.
        TransactionWarning:                                      OK (0.88s)
          +++ OK, passed 100 tests.
        IntervalError:                                           OK (0.04s)
          +++ OK, passed 100 tests.
        TransactionError:                                        OK (0.02s)
          +++ OK, passed 100 tests.
        TransactionOutput:                                       OK (0.96s)
          +++ OK, passed 100 tests.
    Semantics
      Eval Value:                                                OK (4.40s)
        +++ OK, passed 500 tests.
      Eval Observation:                                          OK (0.80s)
        +++ OK, passed 100 tests.
      Division rounding:                                         OK (0.82s)
        +++ OK, passed 100 tests.
      Calling computeTransaction test:                           OK (1.18s)
        +++ OK, passed 100 tests.
      Calling computeTransaction (only valid transactions) test: OK (1.25s)
        +++ OK, passed 100 tests.
    Guarantees
      lemma playTrace_only_accepts_maxTransactionsInitialState:  OK (1.26s)
        +++ OK, passed 100 tests (84% more than one transaction).
      theorem traceToSingleInputIsEquivalent:                    OK (2.81s)
        +++ OK, passed 100 tests:
        100% Contract can accept more than 2 transactions
        100% Transactions have 2 or more inputs
        16% Transactions have 3 or more inputs
         3% Doesn't end up in close

        Only 3% Doesn't end up in close, but expected 20%
        Only 16% Transactions have 3 or more inputs, but expected 40%
      theorem computeTransactionIsQuiescent:                     OK (1.34s)
        +++ OK, passed 100 tests:
        52% Output contract is a When statement
        34% Non empty transaction
      theorem playTraceIsQuiescent:                              OK (1.14s)
        +++ OK, passed 100 tests.
      theorem timedOutTransaction_closes_contract:               OK (1.18s)
        +++ OK, passed 100 tests:
        100% Transaction without inputs
        96% Timeout contract produces payments
        76% At least 1 transaction
        49% At least 3 transactions
      theorem closeIsSafe:                                       OK (0.93s)
        +++ OK, passed 100 tests:
        100% Close contract produces payments
        100% Transaction without inputs
    Contract examples
      Swap
        Successful execution:                                    OK
        Partial execution:                                       OK
      Escrow
        Everything is alright:                                   OK
        Confirm Problem:                                         OK
        Dismiss Claim:                                           OK
        Confirm Claim:                                           OK

All 58 tests passed (30.18s)

@hrajchert hrajchert requested a review from bjornkihlberg May 10, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants