Changeset 25 for trunk


Ignore:
Timestamp:
03/03/08 09:32:43 (4 years ago)
Author:
dom
Message:

Modify API: test filtering also returns module name

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tests.erl

    r22 r25  
    2020    Funs = [fun (Fix) -> Module:T (Fix) end || T <- Ts], 
    2121    filter_by_attribute (Module, Binary, Tail, [{M, F, Funs} | Tests]); 
    22 filter_by_attribute (_, _, [], Tests) -> 
    23     lists: flatten (Tests). 
     22filter_by_attribute (Module, _, [], Tests) -> 
     23    {Module, lists: flatten (Tests)}. 
    2424 
    2525exports_to_funs (M, [{module_info, _} | Exports], Funs) -> 
  • trunk/src/tests_test.erl

    r24 r25  
    1616filtering_non_tests_returns_empty_list () -> 
    1717    Binary = modules: to_binary ("../fix/eg_code.erl"),  
    18     [] = tests: filter_by_attribute (Binary). 
     18    {eg_code, []} = tests: filter_by_attribute (Binary). 
    1919 
    2020filtering_tests_returns_list_of_funs_from_unloaded_binary () -> 
     
    4545    Binary = modules: to_binary (File_name), 
    4646    false = code: is_loaded (Module), 
    47     Tests = tests: filter_by_attribute (Binary), 
     47    {Module, Tests} = tests: filter_by_attribute (Binary), 
    4848    try 
    4949        {module, Module} = code: load_binary (Module, File_name, Binary), 
Note: See TracChangeset for help on using the changeset viewer.