Skip to content

Tests for assume#1015

Merged
adpaco-aws merged 2 commits intomodel-checking:mainfrom
adpaco-aws:assume-audit
Apr 6, 2022
Merged

Tests for assume#1015
adpaco-aws merged 2 commits intomodel-checking:mainfrom
adpaco-aws:assume-audit

Conversation

@adpaco-aws
Copy link
Contributor

Description of changes:

Adds two simple tests for the assume intrinsic. The current implementation is minimal - the cast to bool cannot be removed (this induces a type-check error later)

The only problem with this intrinsic is the confusing message shown. For example, when applied to assume_ok, the output will show:

Check 1: main.assertion.1
         - Status: SUCCESS
         - Description: "assumption failed"
         - Location: assume_ok.rs:9:14 in function main

Which is similar to the problem with user-defined assertions ( #189 / #562 ), but worse because the condition is not printed.

Resolved issues:

Part of #727

Call-outs:

Testing:

  • How is this change tested? Adds two tests.

  • Is this a refactor change? No.

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@adpaco-aws adpaco-aws requested a review from a team as a code owner April 5, 2022 20:19
@adpaco-aws adpaco-aws merged commit c8c4c46 into model-checking:main Apr 6, 2022
@adpaco-aws adpaco-aws mentioned this pull request Apr 6, 2022
tedinski pushed a commit to tedinski/rmc that referenced this pull request Apr 26, 2022
tedinski pushed a commit that referenced this pull request Apr 27, 2022
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