Skip to content

Commit 2509a5f

Browse files
authored
Merge pull request #320 from atilaneves/fix-317
Fix #317 - not really, just a unit tests since already fixed
2 parents 5b9ba0a + bce31d4 commit 2509a5f

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

tests/unit_threaded/ut/issues.d

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ else {
373373

374374
const testData = allTestData!testModule;
375375
auto tests = createTestCases(testData);
376+
tests.length.should == 2;
376377

377378
auto external = tests.find!(a => a.getPath.canFind("L4")).front;
378379
// opCall returns an array of failures
@@ -383,3 +384,33 @@ else {
383384
internal().length.should == 0;
384385
}
385386
}
387+
388+
version(unitThreadedLight) {}
389+
else {
390+
391+
@("317")
392+
@system unittest {
393+
394+
import unit_threaded.runner.factory: createTestCases;
395+
import std.algorithm: find, canFind;
396+
import std.array: front;
397+
398+
enum testModule = "unit_threaded.ut.modules.issue317";
399+
400+
const testData = allTestData!testModule;
401+
auto tests = createTestCases(testData);
402+
tests.length.should == 3;
403+
404+
auto external = tests.find!(a => a.getPath.canFind("L4")).front;
405+
// opCall returns an array of failures
406+
external().length.should == 0;
407+
408+
auto internal = tests.find!(a => a.getPath.canFind("L7")).front;
409+
// opCall returns an array of internalures
410+
internal().length.should == 0;
411+
412+
auto nested = tests.find!(a => a.getPath.canFind("L10")).front;
413+
// opCall returns an array of internalures
414+
nested().length.should == 0;
415+
}
416+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module unit_threaded.ut.modules.issue317;
2+
3+
4+
unittest {}
5+
6+
struct S {
7+
unittest {}
8+
9+
struct Sub {
10+
unittest {}
11+
}
12+
}

0 commit comments

Comments
 (0)