File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -110,16 +110,18 @@ int main(string[] args)
110
110
}
111
111
112
112
// Find all examples in the specification
113
+ alias findExamples = (file, ddocKey) => file
114
+ .readText
115
+ .findDdocMacro(ddocKey)
116
+ .map! ddocMacroToCode;
117
+
118
+ enum ddocKey = " $(SPEC_RUNNABLE_EXAMPLE" ;
119
+
113
120
foreach (file; specDir.dirEntries(" *.dd" , SpanMode.depth).parallel(1 ))
114
121
{
115
122
import std.uni : isWhite;
116
- auto allTests =
117
- file
118
- .readText
119
- .findDdocMacro(" $(SPEC_RUNNABLE_EXAMPLE" )
120
- .map! ddocMacroToCode
121
- .map! compileAndCheck;
122
123
124
+ auto allTests = findExamples(file, ddocKey).map! compileAndCheck;
123
125
if (! allTests.empty)
124
126
{
125
127
writefln(" %s: %d examples found" , file.baseName, allTests.walkLength);
You can’t perform that action at this time.
0 commit comments