Current section

Files

Jump to
showtime src showtime@tests@test.erl
Raw

src/showtime@tests@test.erl

-module(showtime@tests@test).
-compile(no_auto_import).
-export([test/2, equal/3, not_equal/3, be_ok/2, be_error/2, fail/1, be_true/2, be_false/2]).
-export_type([test/0]).
-type test() :: {test, showtime@tests@meta:meta(), fun(() -> nil)}.
-spec test(showtime@tests@meta:meta(), fun((showtime@tests@meta:meta()) -> nil)) -> test().
test(Meta, Test_function) ->
{test, Meta, fun() -> Test_function(Meta) end}.
-spec equal(IUB, IUB, showtime@tests@meta:meta()) -> nil.
equal(A, B, Meta) ->
showtime@tests@should:equal_meta(A, B, Meta).
-spec not_equal(IUD, IUD, showtime@tests@meta:meta()) -> nil.
not_equal(A, B, Meta) ->
showtime@tests@should:equal_meta(A, B, Meta).
-spec be_ok({ok, any()} | {error, any()}, showtime@tests@meta:meta()) -> nil.
be_ok(A, Meta) ->
showtime@tests@should:be_ok_meta(A, Meta).
-spec be_error({ok, any()} | {error, any()}, showtime@tests@meta:meta()) -> nil.
be_error(A, Meta) ->
showtime@tests@should:be_error_meta(A, Meta).
-spec fail(showtime@tests@meta:meta()) -> nil.
fail(Meta) ->
showtime@tests@should:fail_meta(Meta).
-spec be_true(boolean(), showtime@tests@meta:meta()) -> nil.
be_true(A, Meta) ->
showtime@tests@should:be_true_meta(A, Meta).
-spec be_false(boolean(), showtime@tests@meta:meta()) -> nil.
be_false(A, Meta) ->
showtime@tests@should:be_false_meta(A, Meta).