comparison mde/setup/paths.d @ 68:3a737e06dc50

Unittests: fixes and changes. Plus some doc changes.
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 04 Jul 2008 18:49:16 +0100
parents 108d123238c0
children 25cb7420dc91
comparison
equal deleted inserted replaced
67:108d123238c0 68:3a737e06dc50
129 assert (readOrder == PRIORITY.LOW_HIGH || 129 assert (readOrder == PRIORITY.LOW_HIGH ||
130 readOrder == PRIORITY.HIGH_LOW || 130 readOrder == PRIORITY.HIGH_LOW ||
131 readOrder == PRIORITY.HIGH_ONLY ); 131 readOrder == PRIORITY.HIGH_ONLY );
132 } body { 132 } body {
133 FilePath[] ret; 133 FilePath[] ret;
134
135 debug (mdeUnitTest) {
136 /* Alternate approach - just try from current directory.
137 * Really just for unittests, but with the if condition it shouldn't break anything else. */
138 if (pathsLen == 0) {
139 FilePath file = findFile (filename);
140 if (file !is null)
141 ret ~= file;
142 return ret;
143 }
144 }
145
134 if (readOrder == PRIORITY.LOW_HIGH) { 146 if (readOrder == PRIORITY.LOW_HIGH) {
135 for (size_t i = 0; i < pathsLen; ++i) { 147 for (size_t i = 0; i < pathsLen; ++i) {
136 FilePath file = findFile (paths[i]~filename); 148 FilePath file = findFile (paths[i]~filename);
137 if (file !is null) 149 if (file !is null)
138 ret ~= file; 150 ret ~= file;