aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/src/eunit_tests.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-30 11:28:41 +0200
committerHenrik Nord <[email protected]>2011-08-30 11:28:41 +0200
commitdb333803584b17b6f281c974f8f78034be60e010 (patch)
tree380c5ebb0a684fbc7d6e6a9ffac5641428d250e3 /lib/eunit/src/eunit_tests.erl
parent1a2fbf178614f752f04fd5c7499bb659293adf10 (diff)
parent25543b7f0be1b87351d616143b5d149b1aed1cea (diff)
downloadotp-db333803584b17b6f281c974f8f78034be60e010.tar.gz
otp-db333803584b17b6f281c974f8f78034be60e010.tar.bz2
otp-db333803584b17b6f281c974f8f78034be60e010.zip
Merge branch 'dev' into major
Diffstat (limited to 'lib/eunit/src/eunit_tests.erl')
-rw-r--r--lib/eunit/src/eunit_tests.erl26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/eunit/src/eunit_tests.erl b/lib/eunit/src/eunit_tests.erl
index 37c0b4d6ae..a63d102d98 100644
--- a/lib/eunit/src/eunit_tests.erl
+++ b/lib/eunit/src/eunit_tests.erl
@@ -26,17 +26,17 @@
-include("eunit.hrl").
-ifdef(TEST).
-%% Cause all the other modules to be tested as well as this one.
-full_test_() ->
- %%{application, eunit}. % this currently causes a loop
- %% We use the below until loop detection is implemented
- [eunit_autoexport,
- eunit_striptests,
- eunit_server,
- eunit_proc,
- eunit_serial,
- eunit_test,
- eunit_lib,
- eunit_data,
- eunit_tty].
+id(X) -> X. % for suppressing compiler warnings
-endif.
+
+under_eunit_test() -> ?assert(?UNDER_EUNIT).
+
+let_test() -> ?assertEqual(42, ?LET(X, 17, X+25)).
+
+if_test_() ->
+ [?_assertEqual(17, ?IF(id(1) > 0, 17, 42)),
+ ?_assertEqual(42, ?IF(id(1) < 0, 17, 42))].
+
+matches_test_() ->
+ [?_assert(?MATCHES("hel"++_, "hello")),
+ ?_assertNot(?MATCHES("hal"++_, "hello"))].