Skip to content

Commit

Permalink
fix compiler errors with unittest discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
gedaiu committed Apr 2, 2018
1 parent d9037d9 commit b1a3d12
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
17 changes: 11 additions & 6 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
"dependencies": {
"fluent-asserts": "~>0.11.0",
"libdparse": "*"
"libdparse": "~>0.8.0"
}
},
{
Expand All @@ -56,7 +56,10 @@
"dependencies": {
"dub": "~>1.8.0",
"fluent-asserts": "~>0.11.0",
"libdparse": "*",
"libdparse": {
"version": ">=0.8.0-alpha.5",
"optional": true
},
"vibe-d:data": "~>0.8.0"
},
"subConfigurations": {
Expand All @@ -80,7 +83,7 @@
"optional": true
},
"libdparse": {
"version": "*",
"version": ">=0.8.0-alpha.5",
"optional": true
}
}
Expand All @@ -99,8 +102,10 @@
"version": ">=0.10.2",
"optional": true
},
"libdparse": ">=0.8.0-alpha.5",
"ddmp": ">=0.0.1-0.dev.3"
"libdparse": {
"version": ">=0.8.0-alpha.5",
"optional": true
}
}
},
{
Expand All @@ -120,7 +125,7 @@
],
"dependencies": {
"dub": "~>1.8.0",
"libdparse": "*",
"libdparse": "~>0.8.0",
"vibe-d:http": "~>0.8.2",
"vibe-d:data": "~>0.8.2"
},
Expand Down
6 changes: 3 additions & 3 deletions dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"diet-ng": "1.4.5",
"dub": "1.8.0",
"eventcore": "0.8.34",
"fluent-asserts": "0.11.0",
"fluent-asserts": "0.11.2",
"libasync": "0.8.3",
"libdparse": "0.8.0-alpha.5",
"libdparse": "0.8.0",
"libevent": "2.0.2+2.0.16",
"memutils": "0.4.10",
"openssl": "1.1.6+1.0.1g",
"stdx-allocator": "2.77.0",
"stdx-allocator": "2.77.1",
"taggedalgebraic": "0.10.11",
"vibe-core": "1.4.0",
"vibe-d": "0.8.3"
Expand Down
14 changes: 8 additions & 6 deletions lifecycle/trial/discovery/unit.d
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,15 @@ class UnitTestDiscovery : ITestDiscovery
{
foreach (member; __traits(allMembers, composite))
{
static if (__traits(compiles, __traits(getMember, composite, member))
&& isSingleField!(__traits(getMember, composite, member)) && isUnitTestContainer!(__traits(getMember,
composite, member)) && !isModule!(__traits(getMember, composite, member)))
{
if (__traits(getMember, composite, member).mangleof !in testCases)
static if(!is( typeof(__traits(getMember, composite, member)) == void)) {
static if (__traits(compiles, __traits(getMember, composite, member))
&& isSingleField!(__traits(getMember, composite, member)) && isUnitTestContainer!(__traits(getMember,
composite, member)) && !isModule!(__traits(getMember, composite, member)))
{
discover!(file, moduleName, __traits(getMember, composite, member))();
if (__traits(getMember, composite, member).mangleof !in testCases)
{
discover!(file, moduleName, __traits(getMember, composite, member))();
}
}
}
}
Expand Down

0 comments on commit b1a3d12

Please sign in to comment.