Skip to content

Commit

Permalink
Query: Add regression test for #10642
Browse files Browse the repository at this point in the history
  • Loading branch information
smitpatel committed Jun 5, 2019
1 parent 8152ef9 commit abffe67
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/EFCore.Specification.Tests/Query/SimpleQueryTestBase.Where.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2004,5 +2004,17 @@ public virtual Task TypeBinary_short_circuit(bool isAsync)
os => os.Where(o => (customer is Order)));
#pragma warning restore CS0184 // 'is' expression's given expression is never of the provided type
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Decimal_cast_to_double_works(bool isAsync)
{
var customer = new Customer();

return AssertQuery<Product>(
isAsync,
ps => ps.Where(p => (double?)p.UnitPrice > 100),
entryCount: 2);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,13 @@ SELECT rtrim(rtrim(strftime('%Y-%m-%d %H:%M:%f', ""o"".""OrderDate"", CAST(((CAS
WHERE ""o"".""OrderDate"" IS NOT NULL");
}

public override async Task Decimal_cast_to_double_works(bool isAsync)
{
await base.Decimal_cast_to_double_works(isAsync);

AssertSql(@" ");
}

private void AssertSql(params string[] expected)
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);
}
Expand Down

0 comments on commit abffe67

Please sign in to comment.