Commit 77f7c29
committed
DRY follow-ups: collapse * early-returns, EscapeForDisplay delegates to EscapeChar, extract test helpers
- WildcardMatchAnalyzer: collapse two identical early-exit paths in ExtractWildcardMatches
into one combined condition (nextPatternPos >= Length || nextLiteralIndex == -1);
compute FindNextLiteralMatch once before the guard.
- WildcardMatchAnalyzer: EscapeForDisplay now iterates chars and delegates to EscapeChar
via StringBuilder, eliminating three chained .Replace calls.
- EnhancedErrorMessageTests: extract GetMismatchMessage() helper used by three tests.
- WildcardMatchAnalyzerTests: extract GetDiff() helper used by two GenerateDetailedDiff tests.1 parent e2c4112 commit 77f7c29
3 files changed
Lines changed: 48 additions & 85 deletions
File tree
- IntelliTect.TestTools.Console.Tests
- IntelliTect.TestTools.Console
Lines changed: 21 additions & 43 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 | + | |
| 18 | + | |
| 19 | + | |
9 | 20 | | |
10 | 21 | | |
11 | 22 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
47 | 40 | | |
48 | | - | |
49 | 41 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 42 | | |
54 | 43 | | |
55 | 44 | | |
56 | 45 | | |
57 | 46 | | |
58 | 47 | | |
59 | 48 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
71 | 52 | | |
72 | | - | |
73 | | - | |
74 | 53 | | |
75 | 54 | | |
76 | 55 | | |
77 | 56 | | |
78 | 57 | | |
79 | 58 | | |
80 | | - | |
81 | 59 | | |
82 | 60 | | |
83 | 61 | | |
| |||
Lines changed: 16 additions & 22 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 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | 22 | | |
11 | 23 | | |
| |||
96 | 108 | | |
97 | 109 | | |
98 | 110 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 111 | + | |
107 | 112 | | |
108 | | - | |
109 | | - | |
110 | 113 | | |
111 | | - | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 121 | + | |
123 | 122 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 123 | + | |
130 | 124 | | |
131 | 125 | | |
132 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
223 | 217 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 218 | + | |
229 | 219 | | |
230 | | - | |
| 220 | + | |
| 221 | + | |
231 | 222 | | |
232 | 223 | | |
233 | 224 | | |
| |||
384 | 375 | | |
385 | 376 | | |
386 | 377 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
391 | 382 | | |
392 | 383 | | |
393 | 384 | | |
| |||
0 commit comments