External Libraries: Remove usage of text strings in `assert()` in the `Text_Diff_Engine_native` class.

See #41526


git-svn-id: https://develop.svn.wordpress.org/trunk@42027 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-10-26 11:31:20 +00:00
parent 2ddcc549d2
commit 54602b9904
1 changed files with 7 additions and 7 deletions

View File

@ -330,7 +330,7 @@ class Text_Diff_Engine_native {
$i = 0;
$j = 0;
assert('count($lines) == count($changed)');
assert(count($lines) == count($changed));
$len = count($lines);
$other_len = count($other_changed);
@ -351,7 +351,7 @@ class Text_Diff_Engine_native {
}
while ($i < $len && ! $changed[$i]) {
assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && ! $other_changed[$j]);
$i++; $j++;
while ($j < $other_len && $other_changed[$j]) {
$j++;
@ -383,11 +383,11 @@ class Text_Diff_Engine_native {
while ($start > 0 && $changed[$start - 1]) {
$start--;
}
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}
/* Set CORRESPONDING to the end of the changed run, at the
@ -408,7 +408,7 @@ class Text_Diff_Engine_native {
$i++;
}
assert('$j < $other_len && ! $other_changed[$j]');
assert($j < $other_len && ! $other_changed[$j]);
$j++;
if ($j < $other_len && $other_changed[$j]) {
$corresponding = $i;
@ -424,11 +424,11 @@ class Text_Diff_Engine_native {
while ($corresponding < $i) {
$changed[--$start] = 1;
$changed[--$i] = 0;
assert('$j > 0');
assert($j > 0);
while ($other_changed[--$j]) {
continue;
}
assert('$j >= 0 && !$other_changed[$j]');
assert($j >= 0 && !$other_changed[$j]);
}
}
}