Skip to content

Commit 355429b

Browse files
authored
Merge pull request #2 from JakeGinnivan/netcore
Fixed stack overflow issue in the tests
2 parents 3883cb2 + 5ed8c89 commit 355429b

File tree

3 files changed

+53
-49
lines changed

3 files changed

+53
-49
lines changed
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
2-
"version": "1.0.0-*",
3-
"testRunner": "xunit",
2+
"version": "1.0.0-*",
3+
"testRunner": "xunit",
44

5-
"dependencies": {
6-
"Shouldly": "2.8.0",
7-
"TestStack.BDDfy": {
8-
"target": "project"
5+
"dependencies": {
6+
"Shouldly": "2.8.0",
7+
"TestStack.BDDfy": {
8+
"target": "project"
9+
},
10+
"Microsoft.NETCore.Platforms": "1.0.1",
11+
"xunit.core": "2.2.0-beta2-build3300",
12+
"dotnet-test-xunit": "2.2.0-preview2-build1029"
913
},
10-
"Microsoft.NETCore.Platforms": "1.0.1",
11-
"xunit.core": "2.2.0-beta2-build3300",
12-
"dotnet-test-xunit": "2.2.0-preview2-build1029"
13-
},
1414

15-
"runtimes": {
16-
"win10-x64": {}
17-
},
18-
19-
"frameworks": {
20-
"netcoreapp1.0": {
21-
"dependencies": {
22-
"Microsoft.NETCore.App": "1.0.0"
23-
},
24-
"imports": [
25-
"dnxcore50",
26-
"portable-net45+win8"
27-
]
15+
"runtimes": {
16+
"win10-x64": { }
2817
},
29-
"net46": {
30-
"dependencies": {
31-
"NSubstitute": "1.10.0"
32-
},
33-
"buildOptions": {
34-
"define": [
35-
"Approvals",
36-
"Culture",
37-
"NSubstitute"
38-
]
39-
}
18+
19+
"frameworks": {
20+
"netcoreapp1.0": {
21+
"dependencies": {
22+
"Microsoft.NETCore.App": "1.0.0"
23+
},
24+
"imports": [
25+
"dnxcore50",
26+
"portable-net45+win8"
27+
]
28+
},
29+
"net46": {
30+
"dependencies": {
31+
"NSubstitute": "1.10.0"
32+
},
33+
"buildOptions": {
34+
"define": [
35+
"Approvals",
36+
"Culture",
37+
"NSubstitute"
38+
]
39+
}
40+
}
4041
}
41-
}
4242
}

src/TestStack.BDDfy/TypeExtensions.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static bool IsValueType(this Type type)
3838
}
3939

4040
#else
41+
using System.Linq;
4142
public static class TypeExtensions
4243
{
4344
public static Assembly Assembly(this Type type)
@@ -48,7 +49,10 @@ public static Assembly Assembly(this Type type)
4849

4950
public static object[] GetCustomAttributes(this Type type, Type attributeType, bool inherit)
5051
{
51-
return type.GetCustomAttributes(attributeType, inherit);
52+
return type.GetTypeInfo()
53+
.GetCustomAttributes(attributeType, inherit)
54+
.Cast<object>()
55+
.ToArray();
5256
}
5357

5458
public static bool IsEnum(this Type type)

src/TestStack.BDDfy/project.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"buildOptions": {
77
"embed": "**/Scripts/*.*"
88
},
9-
"dependencies": {
10-
"NETStandard.Library": "1.6.0",
11-
"Newtonsoft.Json": "9.0.1"
12-
},
9+
"dependencies": {
10+
"NETStandard.Library": "1.6.0",
11+
"Newtonsoft.Json": "9.0.1"
12+
},
1313

1414
"frameworks": {
1515
"net40": {
@@ -29,15 +29,15 @@
2929
},
3030
"netstandard1.5": {
3131
"imports": "dnxcore50",
32-
"dependencies": {
33-
"System.Reflection.TypeExtensions": "4.1.0",
34-
"System.Runtime.Loader": "4.0.0",
35-
"System.Threading.ThreadPool": "4.0.10",
36-
"System.Linq.Expressions": "4.1.0",
37-
"System.Reflection": "4.1.0",
38-
"System.Runtime.Extensions": "4.1.0",
39-
"System.Diagnostics.StackTrace": "4.0.1"
40-
}
32+
"dependencies": {
33+
"System.Reflection.TypeExtensions": "4.1.0",
34+
"System.Runtime.Loader": "4.0.0",
35+
"System.Threading.ThreadPool": "4.0.10",
36+
"System.Linq.Expressions": "4.1.0",
37+
"System.Reflection": "4.1.0",
38+
"System.Runtime.Extensions": "4.1.0",
39+
"System.Diagnostics.StackTrace": "4.0.1"
40+
}
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)