Changeset 92 for trunk/src/tester.erl
- Timestamp:
- 01/28/10 16:21:51 (2 years ago)
- File:
-
- 1 edited
-
trunk/src/tester.erl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tester.erl
r90 r92 10 10 With_notify = dict: store (notify, Notify, dict: new ()), 11 11 With_tests = dict: store (tests, dict: new (), With_notify), 12 State = dict: store (node, Node, With_tests), 12 With_binaries = dict: store (binaries, dict: new (), With_tests), 13 State = dict: store (node, Node, With_binaries), 13 14 loop (State). 14 15 … … 34 35 Test_dict = dict: fetch (tests, State), 35 36 New_tests = dict: store (Module, Time_stamped_tests, Test_dict), 36 dict: store (tests, New_tests, State). 37 Binaries_dict = dict: fetch (binaries, State), 38 New_binaries = dict: store (Module, Binary, Binaries_dict), 39 dict: store (binaries, New_binaries, dict: store (tests, New_tests, State)). 37 40 38 41 test (State) -> … … 75 78 Tests = dict: fetch (tests, State), 76 79 New_tests = dict: erase (Module, Tests), 77 dict :store (tests, New_tests, State). 80 Binaries = dict: fetch (binaries, State), 81 New_binaries = dict: erase (Module, Binaries), 82 dict: store (binaries, New_binaries, dict :store (tests, New_tests, State)). 78 83 79 84 flatten (Tests) -> … … 104 109 Node = dict: fetch (node, State), 105 110 Notify = dict: fetch (notify, State), 111 Binaries = dict: fetch (binaries, State), 106 112 fun (Test_definition, {Tester_state, {Run, Passed}}) -> 107 113 {Module, Function, Stamp} = Test_definition, … … 111 117 {'EXIT', Pid, normal} -> 112 118 {Passed + 1, first_test_success (Stamp, now())}; 113 {'EXIT', Pid, Reason} -> 119 {'EXIT', Pid, {Error, Stack_trace}} -> 120 Binary = dict: fetch (Module, Binaries), 121 MFA = {Module, Function, 0}, 122 {File, Line} = modules: locate (MFA, Binary), 123 Location = {Module, Function, 0, File, Line}, 124 List = [{error, Error}, 125 {stack_trace, Stack_trace}, 126 {location, Location}], 127 Reason = dict: from_list (List), 114 128 Notify (Reason), 115 129 {Passed, failed}
Note: See TracChangeset
for help on using the changeset viewer.
