Skip to content

Commit f6a1f36

Browse files
committed
Added arithmetic operators test in Expressions_Scalar_Operator
1 parent b167504 commit f6a1f36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

LiteDB.Tests/Expressions/Expressions_Exec_Tests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ BsonValue S(string s, params BsonValue[] args)
104104
return BsonExpression.Create(s, args).ExecuteScalar(doc);
105105
}
106106

107+
// Arithmetic operators
108+
doc = new BsonDocument();
109+
S("6 + 3").ExpectValue(9);
110+
S("6 * 3").ExpectValue(18);
111+
S("6 % 3").ExpectValue(0);
112+
S("6 / 3").ExpectValue(2);
113+
107114
// Operators order
108115
doc = J("{ a: 1, b: 2, c: 3 }");
109116

0 commit comments

Comments
 (0)