ソースを参照

Test the priority of mathematical calculations

Lith 10 ヶ月 前
コミット
9226120d81

+ 8 - 0
test/Vitorm.MySql.MsTest/CustomTest/ExpressionTreeTest/ExpressionTester.cs

@@ -1,6 +1,7 @@
 using System.Linq.Expressions;
 using Vit.Extensions.Linq_Extensions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Data;
 
 namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
 {
@@ -174,6 +175,13 @@ namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
             }
             #endregion
 
+
+            #region Test the priority of mathematical calculations
+            {
+                predicate = u => 10 + u.id * 10 == 110;
+                var rows = Test(query, predicate);
+            }
+            #endregion
         }
 
 

+ 8 - 0
test/Vitorm.SqlServer.MsTest/CustomTest/ExpressionTreeTest/ExpressionTester.cs

@@ -1,6 +1,7 @@
 using System.Linq.Expressions;
 using Vit.Extensions.Linq_Extensions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Data;
 
 namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
 {
@@ -174,6 +175,13 @@ namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
             }
             #endregion
 
+
+            #region Test the priority of mathematical calculations
+            {
+                predicate = u => 10 + u.id * 10 == 110;
+                var rows = Test(query, predicate);
+            }
+            #endregion
         }
 
 

+ 8 - 0
test/Vitorm.Sqlite.MsTest/CustomTest/ExpressionTreeTest/ExpressionTester.cs

@@ -1,6 +1,7 @@
 using System.Linq.Expressions;
 using Vit.Extensions.Linq_Extensions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Data;
 
 namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
 {
@@ -174,6 +175,13 @@ namespace Vit.Linq.ExpressionTree.ExpressionTreeTest
             }
             #endregion
 
+
+            #region Test the priority of mathematical calculations
+            {
+                predicate = u => 10 + u.id * 10 == 110;
+                var rows = Test(query, predicate);
+            }
+            #endregion
         }