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
9073e65f
Commit
9073e65f
authored
Jun 29, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: replace AssertNearlyEqual - xUnit has this
parent
f635ba75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
BookSleeveTestBase.cs
StackExchange.Redis.Tests/Booksleeve/BookSleeveTestBase.cs
+2
-9
Strings.cs
StackExchange.Redis.Tests/Booksleeve/Strings.cs
+7
-7
No files found.
StackExchange.Redis.Tests/Booksleeve/BookSleeveTestBase.cs
View file @
9073e65f
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
using
System
;
using
System
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Xunit
;
using
Xunit.Abstractions
;
using
Xunit.Abstractions
;
namespace
StackExchange.Redis.Tests.Booksleeve
namespace
StackExchange.Redis.Tests.Booksleeve
...
@@ -10,6 +9,7 @@ namespace StackExchange.Redis.Tests.Booksleeve
...
@@ -10,6 +9,7 @@ namespace StackExchange.Redis.Tests.Booksleeve
public
class
BookSleeveTestBase
public
class
BookSleeveTestBase
{
{
public
ITestOutputHelper
Output
{
get
;
}
public
ITestOutputHelper
Output
{
get
;
}
public
BookSleeveTestBase
(
ITestOutputHelper
output
)
public
BookSleeveTestBase
(
ITestOutputHelper
output
)
{
{
Output
=
output
;
Output
=
output
;
...
@@ -70,12 +70,5 @@ internal static ConnectionMultiplexer GetSecuredConnection()
...
@@ -70,12 +70,5 @@ internal static ConnectionMultiplexer GetSecuredConnection()
conn
.
InternalError
+=
(
s
,
args
)
=>
Trace
.
WriteLine
(
args
.
Exception
.
Message
,
args
.
Origin
);
conn
.
InternalError
+=
(
s
,
args
)
=>
Trace
.
WriteLine
(
args
.
Exception
.
Message
,
args
.
Origin
);
return
conn
;
return
conn
;
}
}
internal
static
RedisFeatures
GetFeatures
(
ConnectionMultiplexer
muxer
)
=>
GetServer
(
muxer
).
Features
;
internal
static
void
AssertNearlyEqual
(
double
x
,
double
y
)
{
if
(
Math
.
Abs
(
x
-
y
)
>
0.00001
)
Assert
.
Equal
(
x
,
y
);
}
}
}
}
}
StackExchange.Redis.Tests/Booksleeve/Strings.cs
View file @
9073e65f
...
@@ -158,13 +158,13 @@ public void IncrDecrFloat()
...
@@ -158,13 +158,13 @@ public void IncrDecrFloat()
var
s
=
conn
.
StringGetAsync
(
"incr"
);
var
s
=
conn
.
StringGetAsync
(
"incr"
);
Assert
NearlyEqual
(
3.1
,
conn
.
Wait
(
v1
)
);
Assert
.
Equal
(
3.1
,
conn
.
Wait
(
v1
),
5
);
Assert
NearlyEqual
(
8.1
,
conn
.
Wait
(
v2
)
);
Assert
.
Equal
(
8.1
,
conn
.
Wait
(
v2
),
5
);
Assert
NearlyEqual
(
6.1
,
conn
.
Wait
(
v3
)
);
Assert
.
Equal
(
6.1
,
conn
.
Wait
(
v3
),
5
);
Assert
NearlyEqual
(
5.1
,
conn
.
Wait
(
v4
)
);
Assert
.
Equal
(
5.1
,
conn
.
Wait
(
v4
),
5
);
Assert
NearlyEqual
(
0.1
,
conn
.
Wait
(
v5
)
);
Assert
.
Equal
(
0.1
,
conn
.
Wait
(
v5
),
5
);
Assert
NearlyEqual
(
2.1
,
conn
.
Wait
(
v6
)
);
Assert
.
Equal
(
2.1
,
conn
.
Wait
(
v6
),
5
);
Assert
NearlyEqual
(
2.1
,
(
double
)
conn
.
Wait
(
s
)
);
Assert
.
Equal
(
2.1
,
(
double
)
conn
.
Wait
(
s
),
5
);
}
}
}
}
...
...
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