summaryrefslogtreecommitdiff
path: root/inttest/code_path_no_recurse/test/codepath_tests.erl
blob: 01a1d2af1b412846776a1b8de0a8faefc2de67c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-module(codepath_tests).
-include_lib("eunit/include/eunit.hrl").

codepath_test() ->
    ?assertEqual({module, codepath}, code:ensure_loaded(codepath)),
    ?assertEqual({module, foodep}, code:ensure_loaded(foodep)),
    ?assertEqual({module, bazdep}, code:ensure_loaded(bazdep)),
    ?assert(codepath:codepath()).

unuseddep_test() ->
    ?assertEqual(non_existing, code:which(unuseddep)),
    ?assertEqual({error, nofile}, code:ensure_loaded(unuseddep)).