Changeset 21 for trunk


Ignore:
Timestamp:
02/22/08 16:58:41 (4 years ago)
Author:
dom
Message:

Added filtering with a mixture of plain tests and fixtured tests (with Charpi)

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tests.erl

    r19 r21  
    2828    Fun = fun () -> M: F () end, 
    2929    exports_to_funs (M, Exports, [Fun | Funs]); 
    30 exports_to_funs (M, [{F, 1} | Exports], Funs) -> 
    31     Fun = fun (Fix) -> M: F (Fix) end, 
    32     exports_to_funs (M, Exports, [Fun | Funs]); 
     30exports_to_funs (M, [{_, _} | Exports], Funs) -> 
     31    exports_to_funs (M, Exports, Funs); 
    3332exports_to_funs (_, [], Funs) -> 
    3433    Funs. 
  • trunk/src/tests_test.erl

    r20 r21  
    1111    filtering_tests_returns_list_of_funs_from_unloaded_binary (), 
    1212    filtering_fixtured_tests_returns_list_of_fixture_fun_tuples (), 
     13    filtering_understands_mixed_export_and_fixtured_tests (), 
    1314    ok. 
    1415 
     
    3233    filtering (File_name, eg_test_with_fixture, Test). 
    3334     
     35filtering_understands_mixed_export_and_fixtured_tests () -> 
     36    File_name = "../fix/eg_test_with_and_without_fixture.erl", 
     37    Test = fun ([{Module, Fixture, With}, Without]) -> 
     38                   {'EXIT', {Reason, _}} = (catch Without ()), 
     39                   {badmatch, without_fixture_ok} = Reason, 
     40                   [ok] = Module: Fixture (With) 
     41           end, 
     42    filtering (File_name, eg_test_with_and_without_fixture, Test). 
     43 
    3444filtering (File_name, Module, Test) -> 
    3545    Binary = modules: to_binary (File_name), 
Note: See TracChangeset for help on using the changeset viewer.