$edits = array();
$xi = $yi = 0;
while ( $xi < $n_from || $yi < $n_to ) {
- assert( $yi < $n_to || $this->xchanged[$xi] );
- assert( $xi < $n_from || $this->ychanged[$yi] );
+ assert( '$yi < $n_to || $this->xchanged[$xi]' );
+ assert( '$xi < $n_from || $this->ychanged[$yi]' );
// Skip matching "snake".
$copy = array();
while ( list( , $y ) = each( $matches ) ) {
if ( empty( $this->in_seq[$y] ) ) {
$k = $this->_lcs_pos( $y );
- assert( $k > 0 );
+ assert( '$k > 0' );
$ymids[$k] = $ymids[$k -1];
break;
}
}
while ( list ( , $y ) = each( $matches ) ) {
if ( $y > $this->seq[$k -1] ) {
- assert( $y < $this->seq[$k] );
+ assert( '$y < $this->seq[$k]' );
// Optimization: this is a common case:
// next match is just replacing previous match.
$this->in_seq[$this->seq[$k]] = false;
$this->in_seq[$y] = 1;
} elseif ( empty( $this->in_seq[$y] ) ) {
$k = $this->_lcs_pos( $y );
- assert( $k > 0 );
+ assert( '$k > 0' );
$ymids[$k] = $ymids[$k -1];
}
}
}
}
- assert( $ypos != $this->seq[$end] );
+ assert( '$ypos != $this->seq[$end]' );
$this->in_seq[$this->seq[$end]] = false;
$this->seq[$end] = $ypos;
$mapped_from_lines, $mapped_to_lines ) {
wfProfileIn( __METHOD__ );
- assert( sizeof( $from_lines ) == sizeof( $mapped_from_lines ) );
- assert( sizeof( $to_lines ) == sizeof( $mapped_to_lines ) );
+ assert( 'sizeof( $from_lines ) == sizeof( $mapped_from_lines )' );
+ assert( 'sizeof( $to_lines ) == sizeof( $mapped_to_lines )' );
parent::__construct( $mapped_from_lines, $mapped_to_lines );
$this->_flushLine( $tag );
$word = substr( $word, 1 );
}
- assert( !strstr( $word, "\n" ) );
+ assert( '!strstr( $word, "\n" )' );
$this->_group .= $word;
}
}
} elseif ( $found == 'line-end' ) {
$piece = $stack->top;
// A heading must be open, otherwise \n wouldn't have been in the search list
- assert( $piece->open == "\n" );
+ assert( '$piece->open == "\n"' );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close
// Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
} elseif ( $found == 'line-end' ) {
$piece = $stack->top;
// A heading must be open, otherwise \n wouldn't have been in the search list
- assert( $piece->open == "\n" );
+ assert( '$piece->open == "\n"' );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close
// Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
} elseif ( $found === 'line-end' ) {
$piece = $stack->getTop();
// A heading must be open, otherwise \n wouldn't have been in the search list
- assert( $piece->open === "\n" );
+ assert( '$piece->open === "\n"' );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close
// Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient