Commit 4dd9de1
committed
[patch] Cover ContiguousMap.Entry equality and exclude benchmarks from Sonar
The SonarCloud quality gate failed on new_coverage (0% vs 80% required),
from exactly two uncovered new lines:
- Containers/ContiguousMap.cs - ContiguousMap<TKey,TValue>.Entry is a
public struct with a full equality surface (Equals(Entry),
Equals(object?), GetHashCode, == and !=) and had no tests at all.
Added four tests covering equal/unequal entries, comparison against
null and an unrelated type, and the Key/Value properties.
- Containers.Benchmarks - benchmark code is never executed by the test
suite, so it can only ever report 0% coverage. Set SonarQubeExclude on
the benchmark project.
Excluding the benchmark project also retires the 33 benchmark-only
findings that are artifacts of benchmark style rather than defects:
29x S3267 (identical foreach/counter loops kept uniform across competing
collections so the comparisons stay fair), 3x S4158 (operations on
intentionally-empty collections in EmptyCollectionOperations, plus a
foreach immediately after PushBack) and 1x S2583.
Build clean on all 8 TFMs, 355/355 tests pass.1 parent 4b449ae commit 4dd9de1
2 files changed
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
9 | 18 | | |
10 | 19 | | |
11 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
528 | 580 | | |
0 commit comments