Changeset 33
- Timestamp:
- 06/24/08 14:33:47 (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
fix/eg_test_fix.erl (modified) (1 diff)
-
fix/eg_test_fix_nofix.erl (modified) (1 diff)
-
src/shells.erl (modified) (1 diff)
-
src/tester_test.erl (modified) (4 diffs)
-
src/tests.erl (modified) (1 diff)
-
src/tests_test.erl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fix/eg_test_fix.erl
r24 r33 12 12 13 13 fixture (Tests) -> 14 [ Test ("data") || Test<- Tests].14 [M: F ("data") || {M, F} <- Tests]. -
trunk/fix/eg_test_fix_nofix.erl
r24 r33 11 11 12 12 fixture (Tests) -> 13 [ Test ("data") || Test<- Tests].13 [M: F ("data") || {M, F} <- Tests]. -
trunk/src/shells.erl
r32 r33 28 28 ok = tester_test: reruns_a_test_when_given_module (Test_node), 29 29 ok = tester_test: runs_given_tests (Test_node), 30 ok = tester_test: runs_a_fixtured_test (Test_node), 30 31 Caller ! {Caller, done}. 31 32 -
trunk/src/tester_test.erl
r32 r33 1 %%% Copyright (c) 2008 Dominic Williams 1 %%% Copyright (c) 2008 Dominic Williams, Nicolas Charpentier 2 2 %%% All rights reserved. 3 3 %%% See file COPYING. … … 6 6 -export ([runs_a_test/1, reruns_a_test_when_given_module/1]). 7 7 -export ([runs_given_tests/1]). 8 -export ([runs_a_fixtured_test/1]). 8 9 -test ([{nodes_fix, test_node, [runs_a_test, runs_given_tests]}]). 9 10 -test ([{nodes_fix, test_node, [reruns_a_test_when_given_module]}]). … … 44 45 [{3, 0, 0}, {3, 1, 1}, _, {3, 2, 1}, {3, 3, 2}] = Result, 45 46 ok. 46 47 48 runs_a_fixtured_test (Node) -> 49 Tester = start_tester (Node), 50 [{1, 0, 0}, {1, 1, 1}] = send (eg_test_fix, Tester), 51 ok. 52 47 53 receive_all (Ms) -> 48 54 receive … … 54 60 55 61 %%% Test to be added: 56 %%% with fixtures57 62 %%% tests that never end (e.g. infinite loop) 58 63 %%% Code loading and re-running all tests when one of many is refreshed -
trunk/src/tests.erl
r28 r33 21 21 filter_by_attribute (Module, Binary, Tail, [Funs | Tests]); 22 22 filter_by_attribute (Module, Binary, [{M, F, Ts} | Tail], Tests) -> 23 Funs = [ fun (Fix) -> Module:T (Fix) end|| T <- Ts],24 filter_by_attribute (Module, Binary, Tail, [{M, F, Funs} | Tests]);23 Funs = [{Module, T} || T <- Ts], 24 filter_by_attribute (Module, Binary, Tail, [{M, F, [Funs]} | Tests]); 25 25 filter_by_attribute (Module, _, [], Tests) -> 26 26 {Module, lists: flatten (Tests)}. -
trunk/src/tests_test.erl
r28 r33 31 31 filtering_fixtured_tests_returns_list_of_fixture_fun_tuples () -> 32 32 File_name = "../fix/eg_test_fix.erl", 33 Test = fun ([{Module, Fixture, Tests}]) ->33 Test = fun ([{Module, Fixture, [Tests]}]) -> 34 34 [ok] = Module: Fixture (Tests) 35 35 end, … … 38 38 filtering_understands_mixed_export_and_fixtured_tests () -> 39 39 File_name = "../fix/eg_test_fix_nofix.erl", 40 Test = fun ([{Module, Fixture, With}, Without]) ->40 Test = fun ([{Module, Fixture, [With]}, Without]) -> 41 41 {Wo_m, Wo_f, Wo_a} = Without, 42 42 {'EXIT', {Reason, _}} = (catch apply (Wo_m, Wo_f, Wo_a)),
Note: See TracChangeset
for help on using the changeset viewer.
