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

Improving testing framework and adding the capability to predicate on resulting log #450

Merged
merged 75 commits into from
Sep 11, 2024

Conversation

mmontin
Copy link
Collaborator

@mmontin mmontin commented Sep 4, 2024

When we use predicates on results of traces, we need to take into account the logging that happens during the run. This is what this PR aims to achieve.

@florentc
Copy link
Member

florentc commented Sep 4, 2024

Is there another branch than main to use as a target in Github for this PR in order to improve readability of the diff and only show the changes related to this PR?

@mmontin mmontin changed the title Predicate on results of run depending on logging Improving testing framework and adding the capability to predicate on resulting log Sep 4, 2024
@mmontin mmontin marked this pull request as ready for review September 10, 2024 13:13
Copy link
Member

@florentc florentc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great and long overdue overhaul of the testing module, that is sane and straightforward.

src/Cooked/MockChain/Testing.hs Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
@@ -279,6 +114,9 @@ instance IsProp Bool where
testConjoin = and
testDisjoin = or

-- * Extra HUnit assertions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those exactly. Do we ever need them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are used in some testing modules. They used to be in some sort of a utility module in tests which was removed a while ago.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. What do you think about those?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they are here for a lack of a better location, but they do not create any harm.

src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/Testing.hs Outdated Show resolved Hide resolved
@mmontin mmontin merged commit 3c36e57 into main Sep 11, 2024
6 checks passed
@mmontin mmontin deleted the mm/tests-on-logging branch September 11, 2024 15:14
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