Changeset 34 for trunk/src/tester.erl


Ignore:
Timestamp:
08/22/08 18:46:07 (4 years ago)
Author:
dom
Message:

Removed everything related to fixtures while the concept matures a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tester.erl

    r30 r34  
    2222 
    2323load ({File_name, Binary}, State) -> 
    24     {Module, Functions} = tests: filter_by_attribute (Binary), 
     24    {Module, Tests} = tests: filter_by_attribute (Binary), 
    2525    Node = dict: fetch (node, State), 
    2626    Load_args = [Module, File_name, Binary], 
    2727    {module, Module} = rpc: call (Node, code, load_binary, Load_args), 
    28     New_tests = dict: store (Module, Functions, dict: fetch (tests, State)), 
     28    New_tests = dict: store (Module, Tests, dict: fetch (tests, State)), 
    2929    dict: store (tests, New_tests, State). 
    3030 
    3131test (State) -> 
    32     {Total, Tests} = flatten (dict: fetch (tests, State)), 
     32    Test_dict = dict: fetch (tests, State), 
     33    {Total, Tests} = flatten (Test_dict), 
    3334    Notify = dict: fetch (notify, State), 
    3435    Notify ({Total, 0, 0}), 
     
    3738 
    3839flatten (Tests) -> 
    39     F = fun (_, Ts, {Count, List}) -> 
    40                 {Count + length (Ts), [Ts | List]} 
     40    F = fun (Module, Ts, {Count, List}) -> 
     41                {Count + length (Ts), [[{Module, T} || T <- Ts] | List]} 
    4142        end, 
    4243    {Total, All} = dict: fold (F, {0, []}, Tests), 
     
    4647    Node = dict: fetch (node, State), 
    4748    Notify = dict: fetch (notify, State), 
    48     fun ({M, F, A}, {Run, Passed}) -> 
    49             Pid = spawn_link (Node, M, F, A), 
     49    fun ({Module, Function}, {Run, Passed}) -> 
     50            Pid = spawn_link (Node, Module, Function, []), 
    5051            New_passed = 
    5152                receive 
Note: See TracChangeset for help on using the changeset viewer.