Skip to content

Commit

Permalink
More translation test cleanup
Browse files Browse the repository at this point in the history
Random, DateTime.Parse/new, bitwise operators

Continues dotnet#34872
  • Loading branch information
roji committed Dec 18, 2024
1 parent b8ddc5b commit 14ff1d3
Show file tree
Hide file tree
Showing 29 changed files with 1,296 additions and 1,008 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,34 +52,6 @@ public override async Task Like_identity(bool async)
AssertSql();
}

public override Task Random_return_less_than_1(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Random_return_less_than_1(async);

AssertSql(
"""
SELECT VALUE COUNT(1)
FROM root c
WHERE ((c["$type"] = "Order") AND (RAND() < 1.0))
""");
});

public override Task Random_return_greater_than_0(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Random_return_greater_than_0(async);

AssertSql(
"""
SELECT VALUE COUNT(1)
FROM root c
WHERE ((c["$type"] = "Order") AND (RAND() >= 0.0))
""");
});

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

Expand Down
Loading

0 comments on commit 14ff1d3

Please sign in to comment.