Skip to content

Conversation

@sjakobi
Copy link
Member

@sjakobi sjakobi commented Oct 5, 2025

No description provided.

, testProperty "m1\\m2 ⊆ m1" $
\(m1 :: HMKI) (m2 :: HMKI) -> HM.isSubmapOf (HM.difference m1 m2) m1
, testProperty "m1 ∩ m2 ≠ ∅ ⇒ m1 ⊈ m1\\m2 " $
, testProperty "m1 ∩ m2 ≠ ∅ ⇒ m1 ⊈ m1\\m2 " $ QC.withMaxSize 200 $
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we even have this property?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. It seems to be the same idea as the m ⊈ delete k m test below. I've deleted this test a few other ones in #518.

\(x :: HMKI) (y :: HMKI) ->
toOrdMap (HM.intersection x y) === M.intersection (toOrdMap x) (toOrdMap y)
, testProperty "valid" $
, testProperty "valid" $ QC.withMaxSize 200 $
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does this test take a long time? I'd much rather have a slightly more complex valid than weaken validity tests. Also, should we reuse the maps generated for the previous test? .&&. will let us know which part failed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I dug through the validity code, and it all looks like it should be fast. That makes me wonder why this test would take a long time

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed I was misled when I tried to run these tests with stack test --coverage and inflated --quickcheck-max-size. Without the HPC options, the runtimes are entirely unremarkable.

@sjakobi
Copy link
Member Author

sjakobi commented Oct 6, 2025

Superseded by #519.

@sjakobi sjakobi closed this Oct 6, 2025
@sjakobi sjakobi deleted the sjakobi/maxSize branch October 6, 2025 09:10
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