Commit c07267e
committed
Tests/Tokenizer: fix
Among other things, the RecurseScopeMapDefaultKeywordConditionsTest
::testSwitchDefault() method checks if tokens within the scope of a
`T_DEFAULT` token have `T_DEFAULT` set as one of its `conditions` array.
The test was incorrectly checking token `conditions` due to an
off-by-one error in the loop range when the `T_DEFAULT` uses curly
braces.
For a `T_DEFAULT` with curly braces, the tokenizer adds `T_DEFAULT` to
the `conditions` array of all the tokens within its scope up to the
`T_BREAK|T_RETURN|T_CONTINUE`, but the test was checking only until the
token before the `T_BREAK|T_RETURN|T_CONTINUE`.conditions checking range in T_DEFAULT test1 parent 08a864f commit c07267e
File tree
1 file changed
+1
-1
lines changed- tests/Core/Tokenizers/Tokenizer
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
0 commit comments