-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Enso asserts on CI #7929
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a0c62e6
Enable Enso asserts via ENSO_ENABLE_ASSERTIONS env var in CI
Akirathan 824c368
Add Asserts_Spec tests
Akirathan 722d7ae
fmt
Akirathan c205556
Include Asserts_Spec in the test suite
Akirathan 00575c5
Fix Assert_Spec tests
Akirathan 9dfaef1
fmt
Akirathan 0ab2358
Merge branch 'develop' into wip/akirathan/Enable-Enso-asserts
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from Standard.Base import all | ||
|
||
from Standard.Base.Errors.Common import Assert_Error | ||
|
||
from Standard.Test import Test, Test_Suite | ||
import Standard.Test.Extensions | ||
|
||
foreign js js_check = """ | ||
4 == 2 + 2 | ||
|
||
on_ci = if env.get "ENSO_RUNNER_CONTAINER_NAME" . is_nothing . not then Nothing else "Not in CI" | ||
|
||
spec = Test.group "Asserts" pending=on_ci <| | ||
Test.specify "should be enabled on the CI" <| | ||
p = Panic.catch Assert_Error (Runtime.assert False) err-> | ||
err.payload | ||
Meta.type_of p . should_be Assert_Error | ||
|
||
Test.specify "should be able to take foreign functions as expressions" <| | ||
ret = Runtime.assert js_check | ||
ret . should_be Nothing | ||
|
||
Test.specify "should be able to take lambdas as expressions" <| | ||
Runtime.assert <| | ||
4 == 2 + 2 | ||
|
||
main = Test_Suite.run_main spec |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also an assertion failure test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's at https://github.com/enso-org/enso/pull/7929/files#diff-1df4b4c9618f8108ff5511f70217fa51b36c19ccce43b713e972a911c016ac12R15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very basic, but there are many other tests in engine.