Skip to content

Commit 38ff333

Browse files
committed
Add test for both int and double
1 parent f6a1f36 commit 38ff333

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

LiteDB.Tests/Expressions/Expressions_Exec_Tests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,16 @@ BsonValue S(string s, params BsonValue[] args)
106106

107107
// Arithmetic operators
108108
doc = new BsonDocument();
109+
// Int
109110
S("6 + 3").ExpectValue(9);
110111
S("6 * 3").ExpectValue(18);
111112
S("6 % 3").ExpectValue(0);
112113
S("6 / 3").ExpectValue(2);
114+
// Double
115+
S("6.0 + 3.0").ExpectValue(9);
116+
S("6.0 * 3.0").ExpectValue(18);
117+
S("6.0 % 3.0").ExpectValue(0);
118+
S("6.0 / 3.0").ExpectValue(2);
113119

114120
// Operators order
115121
doc = J("{ a: 1, b: 2, c: 3 }");

0 commit comments

Comments
 (0)