x), explode("\n", $this->y));
        $diffformatter = new TableDiffFormatter();
        $actual = $diffformatter->format($diff);
        $expected = '
| zzz | ddd | 
|  |  | 
| aaa | aaa | 
|  |  | 
|  | bbb | 
|  |  | 
| bbb | bbb | 
| ccc | ccc | 
|  |  | 
| ddd | ccc | 
|  |  | 
| ddd |  | 
|  |  | 
| ddd |  | 
|  |  | 
| eee | eee | 
|  |  | 
| fff |  | 
';
        $this->assertEquals($expected, $actual);
    }
    function test_render_inline(){
        $diff = new Diff(explode("\n", $this->x), explode("\n", $this->y));
        $diffformatter = new InlineDiffFormatter();
        $actual = $diffformatter->format($diff);
        $expected = '|
| zzzddd | 
|  | 
| aaa | 
|  | 
| bbb | 
|  | 
| bbb | 
|
| ccc | 
|  | 
| ddd  | 
|   | 
| ddd  | 
|   | 
| dddccc | 
|  | 
| eee | 
|  | 
| fff | 
';
        $this->assertEquals($expected, $actual);
    }
    function test_engine_diag(){
        // initialize
        $eng = new _DiffEngine;
        $eng->diff(explode("\n", $this->x), explode("\n", $this->y));
        // check
        $this->assertEquals(
            array(9, array(array(0,0),array(1,2),array(3,4),array(4,5),array(5,7),array(6,9),array(7,10),array(9,12),array(15,13))),
            $eng->_diag(0, 15, 0, 13, 8)
        );
    }
}
//Setup VIM: ex: et ts=4 :