Skip to content

added match_raises a generalized version of check_raises - #386

Merged
MisterDA merged 2 commits into
mirage:mainfrom
JoanThibault:feature-issue-88
Jun 5, 2023
Merged

MisterDA merged 2 commits into
mirage:mainfrom
JoanThibault:feature-issue-88

Conversation

@JoanThibault

Copy link
Copy Markdown
Contributor

proposal for issue 88: #88

@dinosaure dinosaure left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The CI error seems unrelated to this PR.

@samoht

samoht commented Jun 5, 2023

Copy link
Copy Markdown
Member

Could you run ocamlformat on your patch? ie. dune build @fmt --auto should fix the CI error.

@MisterDA

MisterDA commented Jun 5, 2023

Copy link
Copy Markdown
Collaborator

CI failure is unrelated, and fixed by #387. Thanks for the PR!

@MisterDA
MisterDA merged commit 755ecd0 into mirage:main Jun 5, 2023
samoht added a commit to samoht/opam-repository that referenced this pull request Jul 25, 2024
CHANGES:

- Add `match_raises`, a generalized version of `check_raises`
  (mirage/alcotest#88, mirage/alcotest#386, @JoanThibault)

- Update JaneStreet core and async to v0.16 (mirage/alcotest#390 @tmcgilchrist)

- Fix division by zero when size of the terminal is incorrectly
  reported as zero. (fix mirage/alcotest#356, mirage/alcotest#381, @MisterDA)

- Enable terminal size reporting on macOS and Windows. Also report the
  terminal size even when the test is run buffered by Dune.
  (mirage/alcotest#381, mirage/alcotest#396, @MisterDA)

- Allow overriding the number of columns with `ALCOTEST_COLUMNS` env
  var. (mirage/alcotest#322, mirage/alcotest#381, @MisterDA)

- Be able to allocate and use user's formatters for stdout/stderr
  (mirage/alcotest#399, @dinosaure)

- Stop detecting ocamlci specifically, since there's nothing specific
  about it. Simply use the `CI` env var to detect CIs. Improve CI
  detection.
  (mirage/alcotest#397, @MisterDA)
Halbaroth pushed a commit to Halbaroth/opam-repository that referenced this pull request Jul 26, 2024
CHANGES:

- Add `match_raises`, a generalized version of `check_raises`
  (mirage/alcotest#88, mirage/alcotest#386, @JoanThibault)

- Update JaneStreet core and async to v0.16 (mirage/alcotest#390 @tmcgilchrist)

- Fix division by zero when size of the terminal is incorrectly
  reported as zero. (fix mirage/alcotest#356, mirage/alcotest#381, @MisterDA)

- Enable terminal size reporting on macOS and Windows. Also report the
  terminal size even when the test is run buffered by Dune.
  (mirage/alcotest#381, mirage/alcotest#396, @MisterDA)

- Allow overriding the number of columns with `ALCOTEST_COLUMNS` env
  var. (mirage/alcotest#322, mirage/alcotest#381, @MisterDA)

- Be able to allocate and use user's formatters for stdout/stderr
  (mirage/alcotest#399, @dinosaure)

- Stop detecting ocamlci specifically, since there's nothing specific
  about it. Simply use the `CI` env var to detect CIs. Improve CI
  detection.
  (mirage/alcotest#397, @MisterDA)
avsm pushed a commit to avsm/opam-repository that referenced this pull request Sep 5, 2024
CHANGES:

- Add `match_raises`, a generalized version of `check_raises`
  (mirage/alcotest#88, mirage/alcotest#386, @JoanThibault)

- Update JaneStreet core and async to v0.16 (mirage/alcotest#390 @tmcgilchrist)

- Fix division by zero when size of the terminal is incorrectly
  reported as zero. (fix mirage/alcotest#356, mirage/alcotest#381, @MisterDA)

- Enable terminal size reporting on macOS and Windows. Also report the
  terminal size even when the test is run buffered by Dune.
  (mirage/alcotest#381, mirage/alcotest#396, @MisterDA)

- Allow overriding the number of columns with `ALCOTEST_COLUMNS` env
  var. (mirage/alcotest#322, mirage/alcotest#381, @MisterDA)

- Be able to allocate and use user's formatters for stdout/stderr
  (mirage/alcotest#399, @dinosaure)

- Stop detecting ocamlci specifically, since there's nothing specific
  about it. Simply use the `CI` env var to detect CIs. Improve CI
  detection.
  (mirage/alcotest#397, @MisterDA)
Fmt.pf ppf "%t%a %s: got nothing." (pp_location ?here ?pos) Pp.tag
`Fail msg)
| Some e ->
if exnp e then

@psafont psafont Feb 12, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be if not (exnp e) then? I would expect if the function returns true it means that it matches the expectation, so it's not an error, but this isn't documented nor unit-tested.

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.

5 participants