Skip to content

Commit f7421ac

Browse files
committed
fixed approximate precision.
1 parent 7a11bac commit f7421ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MongoDB.Driver.Tests/Linq/Translators/AggregateProjectTranslatorTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public async Task Should_translate_avg()
168168

169169
result.Projection.Should().Be("{ Result: { \"$avg\": \"$M\" }, _id: 0 }");
170170

171-
result.Value.Result.Should().BeApproximately(3.66666667, 5);
171+
result.Value.Result.Should().BeApproximately(3.66666667, .0001);
172172
}
173173

174174
[Test]
@@ -303,7 +303,7 @@ public async Task Should_translate_divide_3_numbers()
303303

304304
result.Projection.Should().Be("{ Result: { \"$divide\": [{ \"$divide\": [\"$_id\", \"$C.E.F\"] }, \"$C.E.H\"] }, _id: 0 }");
305305

306-
result.Value.Result.Should().BeApproximately(0.04, 3);
306+
result.Value.Result.Should().BeApproximately(0.04, .01);
307307
}
308308

309309
[Test]
@@ -334,7 +334,7 @@ public async Task Should_translate_exp()
334334

335335
result.Projection.Should().Be("{ Result: { \"$exp\": [\"$C.E.F\"] }, _id: 0 }");
336336

337-
result.Value.Result.Should().BeApproximately(59874.1417151978, 5);
337+
result.Value.Result.Should().BeApproximately(59874.1417151978, .0001);
338338
}
339339

340340
[Test]
@@ -417,7 +417,7 @@ public async Task Should_translate_ln()
417417

418418
result.Projection.Should().Be("{ Result: { \"$ln\": [\"$C.E.F\"] }, _id: 0 }");
419419

420-
result.Value.Result.Should().BeApproximately(2.39789527279837, 5);
420+
result.Value.Result.Should().BeApproximately(2.39789527279837, .0001);
421421
}
422422

423423
[Test]
@@ -439,7 +439,7 @@ public async Task Should_translate_log10()
439439

440440
result.Projection.Should().Be("{ Result: { \"$log10\": [\"$C.E.F\"] }, _id: 0 }");
441441

442-
result.Value.Result.Should().BeApproximately(1.0413928515823, 5);
442+
result.Value.Result.Should().BeApproximately(1.0413928515823, .0001);
443443
}
444444

445445
[Test]

0 commit comments

Comments
 (0)