Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
b987ab3f
Commit
b987ab3f
authored
May 28, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: at least don't blow up immediately on Mono
parent
e4ef33bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
Extensions.cs
StackExchange.Redis.Tests/Helpers/Extensions.cs
+19
-7
No files found.
StackExchange.Redis.Tests/Helpers/Extensions.cs
View file @
b987ab3f
using
System.Runtime.InteropServices
;
using
System
;
using
System.Runtime.InteropServices
;
using
Xunit.Abstractions
;
using
Xunit.Abstractions
;
namespace
StackExchange.Redis.Tests.Helpers
namespace
StackExchange.Redis.Tests.Helpers
{
{
public
static
class
Extensions
public
static
class
Extensions
{
{
public
static
void
WriteFrameworkVersion
(
this
ITestOutputHelper
output
)
private
static
string
VersionInfo
{
get
;
}
static
Extensions
()
{
{
#if NET462
#if NET462
output
.
WriteLine
(
"Compiled under .NET 4.6.2"
)
;
VersionInfo
=
"Compiled under .NET 4.6.2"
;
#elif NETCOREAPP1_0
#elif NETCOREAPP1_0
output
.
WriteLine
(
"Compiled under .NETCoreApp1.0"
)
;
VersionInfo
=
"Compiled under .NETCoreApp1.0"
;
#elif NETCOREAPP2_0
#elif NETCOREAPP2_0
output
.
WriteLine
(
"Compiled under .NETCoreApp2.0"
)
;
VersionInfo
=
"Compiled under .NETCoreApp2.0"
;
#else
#else
output
.
WriteLine
(
"Compiled under <unknown framework>"
)
;
VersionInfo
=
"Compiled under <unknown framework>"
;
#endif
#endif
output
.
WriteLine
(
"Running on: "
+
RuntimeInformation
.
OSDescription
);
try
{
VersionInfo
+=
"\nRunning on: "
+
RuntimeInformation
.
OSDescription
;
}
catch
(
Exception
)
{
VersionInfo
+=
"\nFailed to get OS version"
;
}
}
}
public
static
void
WriteFrameworkVersion
(
this
ITestOutputHelper
output
)
=>
output
.
WriteLine
(
VersionInfo
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment