Skip to content

More tests for sum types: records as option content#14

Draft
ivan-gavran wants to merge 2 commits into
mainfrom
ivan/recordEnums
Draft

More tests for sum types: records as option content#14
ivan-gavran wants to merge 2 commits into
mainfrom
ivan/recordEnums

Conversation

@ivan-gavran
Copy link
Copy Markdown

This PR adds to the sum type in the quint model one option which has a record as its content.
This will hopefully be useful as a reference because Quint cheatsheet takes this as an example for sum types.

@ivan-gavran ivan-gavran requested a review from romac December 20, 2023 10:28
@romac
Copy link
Copy Markdown
Contributor

romac commented Dec 20, 2023

Great idea! I wonder if instead of adding a variant to Option we can instead define a new sum type and perhaps show two ways of having records with the variant in Rust, ie.

enum A {
  B(C),
  D { x: i32, y: bool }
}

where C is a struct, and with some better names.

What do you think?

@ivan-gavran
Copy link
Copy Markdown
Author

Agree, it will make it clearer! I'll update the PR

@ivan-gavran ivan-gavran marked this pull request as draft December 21, 2023 10:38
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.08%. Comparing base (a141ced) to head (0090cb1).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage   51.08%   51.08%           
=======================================
  Files          14       14           
  Lines         693      693           
=======================================
  Hits          354      354           
  Misses        339      339           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants