Commit 2ce7698
Add tests for conditional IQueryable null checks
Added two new tests that verify the fix handles cases where an IQueryable variable could legitimately be null:
- Where_Queryable_conditional_null_check_with_Contains: Tests `ids != null && ids.Contains(...)`
- Where_Queryable_conditional_null_check_with_Contains_negated: Tests `ids == null || !ids.Contains(...)`
Both tests use a someFlag parameter to conditionally assign the IQueryable, ensuring null checks work correctly when the variable could be null.
Co-authored-by: cincuranet <4540597+cincuranet@users.noreply.github.com>1 parent 089643f commit 2ce7698
File tree
1 file changed
+30
-0
lines changed- test/EFCore.Specification.Tests/Query
1 file changed
+30
-0
lines changedLines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1462 | 1492 | | |
1463 | 1493 | | |
1464 | 1494 | | |
| |||
0 commit comments