aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/src/eunit_tests.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-30 11:23:29 +0200
committerHenrik Nord <[email protected]>2011-08-30 11:23:38 +0200
commit25543b7f0be1b87351d616143b5d149b1aed1cea (patch)
treed7438518433b32bf4c604a51a33fd5c9ede0cee8 /lib/eunit/src/eunit_tests.erl
parent7879629d693df9d34e75d297d171eba0cc5dae5c (diff)
parente70a2fd034793729e10fdba707e7248270116768 (diff)
downloadotp-25543b7f0be1b87351d616143b5d149b1aed1cea.tar.gz
otp-25543b7f0be1b87351d616143b5d149b1aed1cea.tar.bz2
otp-25543b7f0be1b87351d616143b5d149b1aed1cea.zip
Merge branch 'rc/eunit-2.2.0' into dev
* rc/eunit-2.2.0: Updated to EUnit version 2.2.0 OTP-9505
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"))].