Conversation
While SPARK requires these pragmas for proof, it's not necessary to declare them on these generic packages; they can be deferred to the generic instantiation (which is the user's responsibility). Having them declared in LibSAP is overly restrictive as the user may want a different profile (e.g. Ravenscar), and also restricts their use in non-SPARK programs, e.g. using the full Ada runtime. Therefore, it's better to remove them from LibSAP and let the user decide if they need them.
This requires a recent version of GNATcoverage that has support for the Ada2022 language features used by LibSAP. This script was tested with GNATcoverage 26.1.
The suite contains just one test for now.
This makes it possible to fully cover all decisions in Increment_Wrapping during testing while keeping the workaround for the compiler warning.
These functions are used for specification only; they are not executed at run-time (unless ghost assertions are enabled).
633176f to
e58f3bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This sets up some initial unit tests.
The tests can optionally be run with code coverage using GNATcoverage, but it requires a recent version of GNATcoverage (I tested it against GNAT DAS 26.1).
The testsuite doesn't reach 100% coverage yet, since this PR just lays the initial groundwork for the tests.