-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change 3 arg Assert to raise an error
Surprisingly, the three argument version of GAP's `Assert` statement did not raise an error, unlike the more commonly used two argument version. That is: gap> Assert(0, false); Error, Assertion failure not in any function at *stdin*:1 you may 'return;' brk> gap> Assert(0, false, "MESSAGE"); MESSAGE This is a really surprising an unexpected behavior. After some discussion we agreed that both should raise an error. While this is technically a breaking change, we expect the impact of this on the GAP package ecosystem to be minimal, and if at all positive: the few uses of the three argument version we found all seem to be written by someone expecting them to raise an error!
- Loading branch information
Showing
8 changed files
with
38 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
0 | ||
2 | ||
pass! | ||
end of function | ||
Error, Assertion failure: pass! | ||
in | ||
Assert( 2, false, "pass!\n" ); at assert.g:13 called from | ||
<function "runtest">( <arguments> ) | ||
called from read-eval loop at *stdin*:1 | ||
you may 'return;' | ||
[1m[34m[0m[31m |