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 #34872
  • Loading branch information
roji committed Dec 18, 2024
1 parent b8ddc5b commit 3dd3c03
Show file tree
Hide file tree
Showing 28 changed files with 1,294 additions and 1,000 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 3dd3c03

Please sign in to comment.