Changeset 95 for trunk/src/compiler_test.erl
- Timestamp:
- 04/11/10 19:19:02 (22 months ago)
- File:
-
- 1 edited
-
trunk/src/compiler_test.erl (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compiler_test.erl
r94 r95 18 18 -export ([reset_includes_none/0]). 19 19 -export ([reset_includes_found/0]). 20 -export ([can_be_given_several_directories/0]). 20 21 -include_lib("stdlib/include/ms_transform.hrl"). 21 22 … … 25 26 26 27 compiles_and_reports_progress_warnings_and_errors (Root, _) -> 27 Compiler = spawn_link (compiler, init, [notify_me (), Root]),28 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 28 29 Compiler ! check, 29 30 Ms = receive_all (), … … 35 36 36 37 stops (Root, _) -> 37 Compiler = spawn_link (compiler, init, [notify_me (), Root]),38 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 38 39 Compiler ! check, 39 40 receive_all (), … … 68 69 ok = fixtures: use_tree (Tree, F). 69 70 71 can_be_given_several_directories () -> 72 Tree = [{directory, "src1", good_erl_tree ()}, 73 {directory, "src2", [{file, "yo.erl", "-module(yo)."}]}], 74 ok = fixtures: use_tree (Tree, fun can_be_given_several_directories/2). 75 76 can_be_given_several_directories (Root, _) -> 77 Dirs = [filename: join (Root, D) || D <- ["src1", "src2"]], 78 Compiler = spawn_link (compiler, init, [notify_me (), Dirs]), 79 Compiler ! check, 80 Ms = receive_all (), 81 Compiler ! stop, 82 [{3, 0, 0}, _, _, {3, 3, 3}, {{binaries, _}, _}] = Ms, 83 ok. 84 70 85 can_be_given_include_directories () -> 71 86 Src = "-module(inc).\n-include(\"inc.hrl\").", … … 91 106 92 107 adds_root_to_include_path (Root, _) -> 93 Compiler = spawn_link (compiler, init, [notify_me (), Root]),108 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 94 109 Compiler ! check, 95 110 Ms = receive_all (), … … 113 128 114 129 discovers_hrl (Root, _) -> 115 Compiler = spawn_link (compiler, init, [notify_me (), Root]),130 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 116 131 Compiler ! check, 117 132 Ms = receive_all (), … … 121 136 122 137 provides_binaries_when_all_compiled (Root, _) -> 123 Compiler = spawn_link (compiler, init, [notify_me (), Root]),138 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 124 139 Compiler ! check, 125 140 Ms = receive_all (), … … 133 148 134 149 provides_all_binaries_not_just_latest_when_all_compiled (Root, [_, File]) -> 135 Compiler = spawn_link (compiler, init, [notify_me (), Root]),150 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 136 151 Compiler ! check, 137 152 [{2, 0, 0}, _, _, {2, 2, 1}] = receive_all (), … … 144 159 145 160 recompiles_minimally_after_change (Root, _) -> 146 Compiler = spawn_link (compiler, init, [notify_me (), Root]),161 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 147 162 Compiler ! check, 148 163 receive_all (), … … 158 173 159 174 can_start_empty_and_add_files (Root, []) -> 160 Compiler = spawn_link (compiler, init, [notify_me (), Root]),175 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 161 176 Compiler ! check, 162 177 [timeout] = receive_all (), … … 170 185 171 186 notifies_removed_files (Root, [F, _]) -> 172 Compiler = spawn_link (compiler, init, [notify_me (), Root]),187 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 173 188 Compiler ! check, 174 189 receive_all (), … … 181 196 182 197 notifies_removed_files_even_if_never_compiled (Root, [F]) -> 183 Compiler = spawn_link (compiler, init, [notify_me (), Root]),198 Compiler = spawn_link (compiler, init, [notify_me (), [Root]]), 184 199 Compiler ! check, 185 200 [{1, 0, 0}, {_, _}, {1, 1, 0}] = receive_all (), … … 195 210 include_no_directory (Root, _) -> 196 211 Src = filename: join (Root, "src"), 197 Compiler = spawn_link (compiler, init, [notify_me (), Src]),212 Compiler = spawn_link (compiler, init, [notify_me (), [Src]]), 198 213 Compiler ! check, 199 214 [{1, 0, 0}, {_, _}, {1, 1, 0}] = receive_all (), … … 204 219 Src = filename: join (Root, "src"), 205 220 Inc = filename: join (Root, "include"), 206 Compiler = spawn_link (compiler, init, [notify_me (), Src, [{i, Inc}]]),221 Compiler = spawn_link (compiler, init, [notify_me (), [Src], [{i, Inc}]]), 207 222 Compiler ! check, 208 223 [{1, 0, 0}, {1, 1, 1}, {{binaries, _}, _}] = receive_all (),
Note: See TracChangeset
for help on using the changeset viewer.
