-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 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
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 |