Skip to content

Commit

Permalink
Merge pull request #710 from input-output-hk/PLT-7397
Browse files Browse the repository at this point in the history
PLT-7397 PLT-7399 Revisions to tests for new validators
  • Loading branch information
bwbush committed Sep 10, 2023
2 parents 4edd788 + 1eaed1c commit 579705e
Show file tree
Hide file tree
Showing 9 changed files with 342 additions and 163 deletions.
16 changes: 8 additions & 8 deletions marlowe-cli/tests/Spec/Analysis.hs
Expand Up @@ -188,17 +188,17 @@ expected False =
A..= A.object
[ "Memory"
A..= A.object
[ "Actual" A..= (18669682 :: Integer)
[ "Actual" A..= (18668386 :: Integer)
, "Invalid" A..= True
, "Maximum" A..= (14000000 :: Integer)
, "Percentage" A..= (100 * 18669682 / 14000000 :: Double)
, "Percentage" A..= (100 * 18668386 / 14000000 :: Double)
]
, "Steps"
A..= A.object
[ "Actual" A..= (4792433421 :: Integer)
[ "Actual" A..= (4791520395 :: Integer)
, "Invalid" A..= False
, "Maximum" A..= (10000000000 :: Integer)
, "Percentage" A..= (100 * 4792433421 / 10000000000 :: Double)
, "Percentage" A..= (100 * 4791520395 / 10000000000 :: Double)
]
]
]
Expand All @@ -208,17 +208,17 @@ expected True =
A..= A.object
[ "Memory"
A..= A.object
[ "Actual" A..= (21384456 :: Integer)
[ "Actual" A..= (21383160 :: Integer)
, "Invalid" A..= True
, "Maximum" A..= (14000000 :: Integer)
, "Percentage" A..= (100 * 21384456 / 14000000 :: Double)
, "Percentage" A..= (100 * 21383160 / 14000000 :: Double)
]
, "Steps"
A..= A.object
[ "Actual" A..= (5617045520 :: Integer)
[ "Actual" A..= (5616132494 :: Integer)
, "Invalid" A..= False
, "Maximum" A..= (10000000000 :: Integer)
, "Percentage" A..= (100 * 5617045520 / 10000000000 :: Double)
, "Percentage" A..= (100 * 5616132494 / 10000000000 :: Double)
]
]
]
Expand Down
320 changes: 186 additions & 134 deletions marlowe-runtime/.golden/Job MarloweTxCommand/golden

Large diffs are not rendered by default.

@@ -0,0 +1,7 @@
### Added

- Added new validator scripts to script registry.

### Changed

- Updated script hashes in script-registry test.
141 changes: 130 additions & 11 deletions marlowe-runtime/src/Language/Marlowe/Runtime/Core/ScriptRegistry.hs

Large diffs are not rendered by default.

@@ -0,0 +1,3 @@
### Changed

- Updated script hashes and sizes in validator tests.
3 changes: 3 additions & 0 deletions marlowe-test/marlowe-test.cabal
Expand Up @@ -225,6 +225,9 @@ test-suite marlowe-test
, these >=1.1 && <2
, type-iso ==1.0.1.0

if flag(trace-plutus)
cpp-options: -DTRACE_PLUTUS

executable marlowe-spec-client
import: lang
hs-source-dirs: spec-client
Expand Down
4 changes: 2 additions & 2 deletions marlowe-test/test/Spec/Marlowe/Marlowe.hs
Expand Up @@ -153,9 +153,9 @@ tests =

maxMarloweValidatorSize :: Int
#ifdef TRACE_PLUTUS
maxMarloweValidatorSize = 12840
maxMarloweValidatorSize = 12737
#else
maxMarloweValidatorSize = 12296
maxMarloweValidatorSize = 12194
#endif

-- | Test that the untyped validator is not too large.
Expand Down
6 changes: 3 additions & 3 deletions marlowe-test/test/Spec/Marlowe/Plutus/Specification.hs
Expand Up @@ -234,8 +234,8 @@ tests referencePaths =
-- APPROVED CHANGES TO MARLOWE'S SEMANTICS VALIDATOR. THIS HASH
-- HAS IMPLICATIONS FOR VERSIONING, AUDIT, AND CONTRACT DISCOVERY.
( if checkPlutusLog
then "c6db3a4f2e08ce10cd34aa1cd06f97730f5d55e0fcc20e3cb5149ea4"
else "2ed2631dbb277c84334453c5c437b86325d371f0835a28b910a91a6e"
then "7ff54a5e50dee4adf28bc2f5dbaa22791ee44a6ef622ace834dc2d9b"
else "d85fa9bc2bdfd97d5ebdbc5e3fc66f7476213c40c21b73b41257f09d"
)
]
, testGroup
Expand Down Expand Up @@ -268,7 +268,7 @@ tests referencePaths =
-- DO NOT ALTER THE FOLLOWING VALUE UNLESS YOU ARE COMMITTING
-- APPROVED CHANGES TO MARLOWE'S ROLE VALIDATOR. THIS HASH HAS
-- IMPLICATIONS FOR VERSIONING, AUDIT, AND CONTRACT DISCOVERY.
"e165610232235bbbbeff5b998b233daae42979dec92a6722d9cda989"
"10ec7e02d25f5836b3e1098e0d4d8389e71d7a97a57aa737adc1d1fa"
]
]

Expand Down
5 changes: 0 additions & 5 deletions marlowe/marlowe-cardano.cabal
Expand Up @@ -21,11 +21,6 @@ extra-doc-files:
CHANGELOG.md
README.md

data-dir: benchmarks
data-files:
rolepayout/*.benchmark
semantics/*.benchmark

source-repository head
type: git
location: https://github.com/input-output-hk/marlowe-cardano
Expand Down

0 comments on commit 579705e

Please sign in to comment.