-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
997e0fc
commit c525698
Showing
4 changed files
with
35 additions
and
0 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
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 Assertion_Error | ||
|
||
from Standard.Test import Test, Test_Suite | ||
import Standard.Test.Extensions | ||
|
||
foreign js js_check = """ | ||
return (4 == 2 + 2) | ||
|
||
on_ci = if Environment.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 Assertion_Error (Runtime.assert False) err-> | ||
err.payload | ||
Meta.type_of p . should_be_a Assertion_Error | ||
|
||
Test.specify "should be able to take foreign functions as expressions" <| | ||
ret = Runtime.assert js_check | ||
ret . should_be_a Nothing | ||
|
||
Test.specify "should be able to take lambdas as expressions" <| | ||
Runtime.assert <| | ||
4 == 2 + 2 | ||
|
||
main = Test_Suite.run_main spec |