-
Notifications
You must be signed in to change notification settings - Fork 476
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
checking exported ledger types to have Arbitrary instances #6428
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
The code I wrote uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-- This test suite checks the correctness of the PlutusLedgerApi module.
-- It uses QuickCheck to verify that certain types have Arbitrary instances,
TODO:
- list all types that need to be checked.
testsArb :: IO TestTree | ||
testsArb = do | ||
files <- listDirectory "./src/PlutusLedgerApi" | ||
let hsFiles = filter (\file -> file `elem` ["V1.hs", "V2.hs"]) files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which files do we check?
|
||
parseExports :: FilePath -> IO [String] | ||
parseExports filePath = do | ||
output <- readProcess "ghc" ["--show-iface", "./src/PlutusLedgerApi/" ++ filePath] "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error here
How to read code coverage report?
|
ed07a32
to
f912edc
Compare
The issue I am working on asks to implement Arbitrary instances for the types plutus-ledger-api exports so I wrote tests to check if a type has an Arbitrary instance and to check module against a list of exports verified by the user:
Pre-submit checklist:
Arbitrary
instances for Ledger types #6210