Skip to content

Commit

Permalink
Query: Add regression test for #23658
Browse files Browse the repository at this point in the history
Resolves #23658
  • Loading branch information
smitpatel committed Sep 2, 2021
1 parent 636a1e0 commit 37b838f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4275,5 +4275,17 @@ await AssertQuery(
},
elementSorter: e => e.Id);
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Prune_does_not_throw_null_ref(bool async)
{
return AssertQuery(
async,
ss => from ids in (from l2 in ss.Set<Level2>().Where(i => i.Id < 5)
select l2.Level1_Required_Id).DefaultIfEmpty()
from l1 in ss.Set<Level1>().Where(x => x.Id != ids)
select l1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ public override async Task Let_let_contains_from_outer_let(bool async)
SqliteStrings.ApplyNotSupported,
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Let_let_contains_from_outer_let(async))).Message);

public override async Task Prune_does_not_throw_null_ref(bool async)
=> Assert.Equal(
SqliteStrings.ApplyNotSupported,
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Prune_does_not_throw_null_ref(async))).Message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@ public override async Task Let_let_contains_from_outer_let(bool async)
SqliteStrings.ApplyNotSupported,
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Let_let_contains_from_outer_let(async))).Message);

public override async Task Prune_does_not_throw_null_ref(bool async)
=> Assert.Equal(
SqliteStrings.ApplyNotSupported,
(await Assert.ThrowsAsync<InvalidOperationException>(
() => base.Prune_does_not_throw_null_ref(async))).Message);
}
}

0 comments on commit 37b838f

Please sign in to comment.