typelevel / typelevel/cats

Add tests for laws

Open
#1,423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
5.5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
5

Description

As @johnynek notes in the discussion of #1417, we're not currently confirming that laws checking fails for invalid instances. In #1417 I've added a new laws test for MonadTests#stackUnsafeMonad in laws/test/, since we're not using stackUnsafeMonad anywhere in our laws checking, and we could presumably put other tests (including negative tests) in laws/test as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the discussion in #1417 and the existing tests under laws/test/, including the MonadTests#stackUnsafeMonad coverage mentioned here. Add coverage for invalid law instances and other relevant laws, then run the laws test suite to confirm invalid instances are rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.