diff --git a/test/EFCore.Relational.Specification.Tests/Query/OperatorsQueryTestBase.cs b/test/EFCore.Relational.Specification.Tests/Query/OperatorsQueryTestBase.cs index 8dd662ca36d..b3b9631ecd7 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/OperatorsQueryTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/OperatorsQueryTestBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.EntityFrameworkCore.TestModels.Operators; @@ -30,7 +30,7 @@ protected virtual Task Seed(OperatorsContext ctx) return ctx.SaveChangesAsync(); } - [ConditionalFact(Skip = "issue #30245")] + [ConditionalFact] public virtual async Task Bitwise_and_on_expression_with_like_and_null_check_being_compared_to_false() { var contextFactory = await InitializeAsync(seed: Seed); @@ -40,6 +40,7 @@ public virtual async Task Bitwise_and_on_expression_with_like_and_null_check_bei from o2 in ExpectedData.OperatorEntitiesString from o3 in ExpectedData.OperatorEntitiesBool where ((o2.Value == "B" || o3.Value) & (o1.Value != null)) + orderby o1.Id, o2.Id, o3.Id select new { Value1 = o1.Value, @@ -51,6 +52,7 @@ from o3 in ExpectedData.OperatorEntitiesBool from o2 in context.Set() from o3 in context.Set() where ((EF.Functions.Like(o2.Value, "B") || o3.Value) & (o1.Value != null)) != false + orderby o1.Id, o2.Id, o3.Id select new { Value1 = o1.Value, diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/OperatorsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/OperatorsQuerySqlServerTest.cs index d37943f54ab..dc16cf1b9dd 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/OperatorsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/OperatorsQuerySqlServerTest.cs @@ -19,7 +19,15 @@ public override async Task Bitwise_and_on_expression_with_like_and_null_check_be { await base.Bitwise_and_on_expression_with_like_and_null_check_being_compared_to_false(); - AssertSql(""); + AssertSql( + """ +SELECT [o].[Value] AS [Value1], [o0].[Value] AS [Value2], [o1].[Value] AS [Value3] +FROM [OperatorEntityString] AS [o] +CROSS JOIN [OperatorEntityString] AS [o0] +CROSS JOIN [OperatorEntityBool] AS [o1] +WHERE (([o0].[Value] LIKE N'B' AND [o0].[Value] IS NOT NULL) OR [o1].[Value] = CAST(1 AS bit)) AND [o].[Value] IS NOT NULL +ORDER BY [o].[Id], [o0].[Id], [o1].[Id] +"""); } public override async Task Complex_predicate_with_bitwise_and_modulo_and_negation() diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/OperatorsQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/OperatorsQuerySqliteTest.cs index f7ca1b8418c..321d440275b 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/OperatorsQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/OperatorsQuerySqliteTest.cs @@ -17,7 +17,15 @@ public override async Task Bitwise_and_on_expression_with_like_and_null_check_be { await base.Bitwise_and_on_expression_with_like_and_null_check_being_compared_to_false(); - AssertSql(""); + AssertSql( + """ +SELECT "o"."Value" AS "Value1", "o0"."Value" AS "Value2", "o1"."Value" AS "Value3" +FROM "OperatorEntityString" AS "o" +CROSS JOIN "OperatorEntityString" AS "o0" +CROSS JOIN "OperatorEntityBool" AS "o1" +WHERE (("o0"."Value" LIKE 'B' AND "o0"."Value" IS NOT NULL) OR "o1"."Value") AND "o"."Value" IS NOT NULL +ORDER BY "o"."Id", "o0"."Id", "o1"."Id" +"""); } public override async Task Complex_predicate_with_bitwise_and_modulo_and_negation()