aboutsummaryrefslogtreecommitdiff
path: root/src/std/expect.gleam
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-05-29 21:02:55 +0100
committerLouis Pilfold <louis@lpil.uk>2019-06-02 21:12:59 +0100
commit5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31 (patch)
tree5d0d281c66cf71c6e3ca880e6621138a71b95e7b /src/std/expect.gleam
parentee03f5a0465e176e220060164a5ffc408f73ed0d (diff)
downloadgleam_stdlib-5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31.tar.gz
gleam_stdlib-5a1f3494eb9517a7b7a332cb74dd10a6a7d32d31.zip
Enable namespaced modules
Diffstat (limited to 'src/std/expect.gleam')
-rw-r--r--src/std/expect.gleam20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/std/expect.gleam b/src/std/expect.gleam
new file mode 100644
index 0000000..5ea6a93
--- /dev/null
+++ b/src/std/expect.gleam
@@ -0,0 +1,20 @@
+// TODO: Move this module into another package so it can be used as a
+// dep only in test.
+
+pub external type Expectation;
+
+pub external fn equal(a, a) -> Expectation = "gleam__stdlib" "expect_equal";
+
+pub external fn not_equal(a, a) -> Expectation = "gleam__stdlib" "expect_not_equal";
+
+pub external fn true(Bool) -> Expectation = "gleam__stdlib" "expect_true";
+
+pub external fn false(Bool) -> Expectation = "gleam__stdlib" "expect_false";
+
+pub external fn is_ok(Result(a, b)) -> Expectation = "gleam__stdlib" "expect_is_ok";
+
+pub external fn is_error(Result(a, b)) -> Expectation = "gleam__stdlib" "expect_is_error";
+
+pub fn fail() {
+ true(False)
+}