Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ $(ROOT)/tests_extractor: tests_extractor.d
test_tests_extractor: $(ROOT)/tests_extractor
$< -i ./test/tests_extractor/ascii.d | diff - ./test/tests_extractor/ascii.d.ext
$< -i ./test/tests_extractor/iteration.d | diff - ./test/tests_extractor/iteration.d.ext
$< -i ./test/tests_extractor/ignore_version.d | diff - ./test/tests_extractor/ignore_version.d.ext

test_rdmd: $(ROOT)/rdmd_test $(ROOT)/rdmd
$< --compiler=$(abspath $(DMD)) -m$(MODEL)
Expand Down
4 changes: 4 additions & 0 deletions test/tests_extractor/ignore_version.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// Versioned blocks should be ignored
version(StdDdoc)
///
@safe unittest {}
Empty file.
3 changes: 3 additions & 0 deletions tests_extractor.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class TestVisitor : ASTVisitor
decl.accept(this);
}

// ignore `version` blocks
override void visit(const ConditionalDeclaration decl) {}

private:
void print(const Unittest u)
{
Expand Down