Update tests for the physics package and update code #1202
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the pyhsics tests, and adjusts the
PhysicsMethods.ts
file:arg
is true and next is not an open brace, an error is thrown. So to get this far, we knowarg
is false ornext
is an open brace. Since 28 checks forarg
being true, that would only occur ifnext
is an open brace. But in that case, the condition for line 271 will be true, and that block ends with areturn
. So lines 287-288 can never be reached.starKet
can only be true ifhasKet
is true, but theif
at original line 707 means thathasKet
must be false for line 714, and sostarKet
is false, and the|| starKet
is superfluous.endI
is the string index for the character that follows the argument found by theGetArgument()
call on original line 1032, and because original line 1028 guarantees that the argument starts with a brace, this means thatendI
is after the closing brace. Note thatparser.i
changes in the loop only by theGetUpTo()
on line 1040 succeeds, and that only happens when it finds a,
. that would putparser.i
just after that, so it is at most pointing to the closing brace, andendI
is after that, soparser.i
is never greater-than-or-equal-toendI
on line 1046. So I removed that block.