Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: use data-backed SC in constitution script #6758

Closed
wants to merge 6 commits into from

Make changes up to TestState

2ad1048
Select commit
Loading
Failed to load commit list.
Closed

Test: use data-backed SC in constitution script #6758

Make changes up to TestState
2ad1048
Select commit
Loading
Failed to load commit list.
Garnix CI / check plutus-tx-test [x86_64-linux] succeeded Jan 8, 2025 in 7s

Run results

Build succeeded

Details

Last 100 lines of logs:

      one is a left identity:                                                                      OK (0.20s)
          ✓ propOneLeftId passed 100 tests.
      one is a right identity:                                                                     OK (0.18s)
          ✓ propOneRightId passed 100 tests.
    Ring
      zero is a left annihilator:                                                                  OK (0.21s)
          ✓ propZeroLeftAnnih passed 100 tests.
      zero is a right annihilator:                                                                 OK (0.21s)
          ✓ propZeroRightAnnih passed 100 tests.
      * left-distributes over +:                                                                   OK (0.22s)
          ✓ propTimesLeftDistPlus passed 100 tests.
      * right-distributes over +:                                                                  OK (0.23s)
          ✓ propTimesRightDistPlus passed 100 tests.
    Module
      scale 0 = 0:                                                                                 OK (0.23s)
          ✓ propScaleZero passed 100 tests.
      scale 1 = id:                                                                                OK (0.26s)
          ✓ propScaleOne passed 100 tests.
      scale distributes over +:                                                                    OK (0.27s)
          ✓ propScaleDistPlus passed 100 tests.
      scale x (scale y r) = scale (x * y) r:                                                       OK (0.29s)
          ✓ propScaleTimes passed 100 tests.
    Serialization
      FromBuiltinData-ToBuiltinData roundtrip:                                                     OK (0.27s)
          ✓ propIsDataRound passed 100 tests.
      unsafeFromBuiltinData . toBuiltinData = id:                                                  OK (0.29s)
          ✓ propUnsafeIsData passed 100 tests.
      FromJSON-ToJSON roundtrip:                                                                   OK (0.31s)
          ✓ propIsJSONRound passed 100 tests.
    Construction
      ratio x 0 = Nothing:                                                                         OK (0.34s)
          ✓ propZeroDenom passed 100 tests.
      ratio x 1 = Just . fromInteger $ x:                                                          OK (0.39s)
          ✓ propOneDenom passed 100 tests.
      ratio x x = Just 1 for x /= 0:                                                               OK (0.45s)
          ✓ propRatioSelf passed 100 tests.
      sign of result depends on signs of arguments:                                                OK (1.53s)
          ✓ sign of result depends on signs of arguments passed 8000 tests.
            zero numerator  33% ██████▌············· ✓ 30%
            same signs      34% ██████▊············· ✓ 30%
            different signs 33% ██████▋············· ✓ 30%
      if ratio x y = Just r, then unsafeRatio x y = r:                                             OK (0.46s)
          ✓ propConstructionAgreement passed 100 tests.
      if r = fromInteger x, then numerator r = x:                                                  OK (0.34s)
          ✓ propFromIntegerNum passed 100 tests.
      if r = fromInteger x, then denominator r = 1:                                                OK (0.30s)
          ✓ propFromIntegerDen passed 100 tests.
      ratio x y = ratio (x * z) (y * z) for z /= 0:                                                OK (0.33s)
          ✓ propRatioScale passed 100 tests.
      denominator (unsafeRatio x y) > 0:                                                           OK (0.33s)
          ✓ propUnsafeRatioDenomPos passed 100 tests.
    Other
      numerator r = numerator . scale (denominator r) $ r:                                         OK (0.30s)
          ✓ propNumeratorScale passed 100 tests.
      denominator r >= 1:                                                                          OK (0.33s)
          ✓ propPosDen passed 100 tests.
      recip r * r = 1 for r /= 0:                                                                  OK (0.34s)
          ✓ propRecipSelf passed 100 tests.
      abs r >= 0:                                                                                  OK (0.31s)
          ✓ propAbs passed 100 tests.
      abs r * abs r' = abs (r * r'):                                                               OK (0.33s)
          ✓ probAbsTimes passed 100 tests.
      r = n + f, where (n, f) = properFraction r:                                                  OK (0.33s)
          ✓ propProperFrac passed 100 tests.
      signs of properFraction components match sign of input:                                      OK (1.55s)
          ✓ signs of properFraction components match sign of input passed 8000 tests.
            zero     34% ██████▋············· ✓ 30%
            negative 33% ██████▌············· ✓ 30%
            positive 34% ██████▋············· ✓ 30%
      abs f < 1, where (_, f) = properFraction r:                                                  OK (0.35s)
          ✓ propProperFracAbs passed 100 tests.
      abs (round r) >= abs n, where (n, _) = properFraction r:                                     OK (0.33s)
          ✓ propAbsRound passed 100 tests.
      halves round as expected:                                                                    OK (0.36s)
          ✓ propRoundHalf passed 100 tests.
      if abs f < half, then round r = truncate r, where (_, f) = properFraction r:                 OK (0.32s)
          ✓ propRoundLow passed 100 tests.
      if abs f > half, then abs (round r) = abs (truncate r) + 1, where (_, f) = properFraction r: OK (0.36s)
          ✓ propRoundHigh passed 100 tests.
  PlutusTx.Show property-based tests
    PlutusTx.Show @Integer:                                                                        OK (0.36s)
        ✓ PlutusTx.Show @Integer passed 100 tests.
    PlutusTx.Show @BuiltinByteString:                                                              OK (0.38s)
        ✓ PlutusTx.Show @BuiltinByteString passed 100 tests.
  Golden
    product-type:                                                                                  OK (0.01s)
    product-type-2:                                                                                OK
    sum-type-1:                                                                                    OK
    sum-type-2:                                                                                    OK (0.02s)
    record-type:                                                                                   OK (0.06s)
    infix-type:                                                                                    OK
    infix-type-2:                                                                                  OK (0.03s)
    gadt:                                                                                          OK (0.04s)
    poly:                                                                                          OK (0.04s)
  PlutusTx.Blueprint.Definition
    Derived definitions are empty when no types are provided.:                                     OK
    There are not less schema definitions than listed domain types.:                               OK
    All referenced schema definitions are defined.:                                                OK

All 125 tests passed (2.40s)