Permalink
Browse files

Fixed #57

  • Loading branch information...
AltGr committed Apr 2, 2013
1 parent c8037f0 commit 641b641b31010f4f7c5a2ef1a7e5a5b34e454f15
Showing with 5 additions and 186 deletions.
  1. +1 −1 src/indentBlock.ml
  2. +0 −16 tests/failing-output/object.ml
  3. +4 −169 tests/failing.html
  4. 0 tests/{failing → passing}/object.ml
View
@@ -1024,7 +1024,7 @@ let rec update_path config t stream tok =
| ASSERT | LAZY | NEW | MUTABLE ->
append expr_apply L (fold_expr t.path)
- | INHERIT -> append KLet L t.path
+ | INHERIT -> append (KExpr 0) L (unwind_top t.path)
| OCAMLDOC_CODE ->
let l = Path.l t0.path + Path.pad t0.path in
@@ -1,16 +0,0 @@
-let x =
- object
- inherit foo
- method bar = _
- end
-
-class foo =
- object
- method x = 2
- inherit bar
- end
-
-class foo =
- object(this)
- inherit bar
- end
View
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
- <title>Failing tests, ocp-indent version 1.1.0+11 (2013-04-02)</title>
+ <title>Failing tests, ocp-indent version 1.1.0+12 (2013-04-02)</title>
<style>
BODY { font-family: monospace; }
TABLE { border-collapse: collapse; border-spacing: 0px; margin: auto; }
@@ -22,7 +22,7 @@
</style>
</head>
<body>
-<h1>Failing tests, ocp-indent version 1.1.0+11 (2013-04-02)</h1>
+<h1>Failing tests, ocp-indent version 1.1.0+12 (2013-04-02)</h1>
<p>Left is expected result, right shows actual indentation by ocp-indent</p>
<table>
<tr><td width="70%">
@@ -370,7 +370,7 @@ <h1>Failing tests, ocp-indent version 1.1.0+11 (2013-04-02)</h1>
</tr>
</table>
<hr/>
-<i>Generated by <b>diff2html</b> on 2013-04-02 13:16:16</i>
+<i>Generated by <b>diff2html</b> on 2013-04-02 13:21:11</i>
<table>
<tr><td width="70%">
<table>
@@ -1270,171 +1270,6 @@ <h1>Failing tests, ocp-indent version 1.1.0+11 (2013-04-02)</h1>
</tr>
</table>
<hr/>
-<i>Generated by <b>diff2html</b> on 2013-04-02 13:16:18</i>
-<table>
-<tr><td width="70%">
-<table>
- <tr>
- <td class="modified">Modified line(s):&nbsp;</td>
- <td class="modified"><a href='#failing/object.ml_10'>10</a>&nbsp; <a href='#failing/object.ml_15'>15</a>&nbsp; </td>
- </tr>
- <tr>
- <td class="added">Added line(s):&nbsp;</td>
- <td class="added">None </td>
- </tr>
- <tr>
- <td class="removed">Removed line(s):&nbsp;</td>
- <td class="removed">None </td>
- </tr>
-</table>
-</td>
-<td width="30%">
-<font size="-2"><i>Generated by <a href="http://kirk.webfinish.com"><b>diff2html</b></a><br>
-&copy; 2009 Kirk Roybal, WebFinish<br>
-Python version by: Yves Bailly, MandrakeSoft S.A. 2001<br>
-<b>diff2html</b> is licensed under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPL</a>.</i></font>
-</td></tr>
-</table>
-<hr/>
-<table>
- <tr>
- <th>&nbsp;</th>
- <th width="45%"><strong><big>failing/object.ml</big></strong></th>
- <th>&nbsp;</th>
- <th>&nbsp;</th>
- <th width="45%"><strong><big>failing-output/object.ml</big></strong></th>
- </tr>
- <tr>
- <td width="16">&nbsp;</td>
- <td>
- 16 lines<br/>
- 169 bytes<br/>
- Last modified : 2013-04-02 13:16:03 <br>
- <hr/>
- </td>
- <td width="16">&nbsp;</td>
- <td width="16">&nbsp;</td>
- <td>
- 16 lines<br/>
- 169 bytes<br/>
- Last modified : 2013-04-02 13:16:13 <br>
- <hr/>
- </td>
- </tr>
- <tr>
- <td class="linenum">1</td>
- <td class="normal">let x =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">1</td>
- <td class="normal">let x =</td>
- </tr>
- <tr>
- <td class="linenum">2</td>
- <td class="normal">&nbsp;&nbsp;object</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">2</td>
- <td class="normal">&nbsp;&nbsp;object</td>
- </tr>
- <tr>
- <td class="linenum">3</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;inherit foo</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">3</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;inherit foo</td>
- </tr>
- <tr>
- <td class="linenum">4</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;method bar = _</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">4</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;method bar = _</td>
- </tr>
- <tr>
- <td class="linenum">5</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">5</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- </tr>
- <tr>
- <td class="linenum">6</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">6</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">7</td>
- <td class="normal">class foo =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">7</td>
- <td class="normal">class foo =</td>
- </tr>
- <tr>
- <td class="linenum">8</td>
- <td class="normal">&nbsp;&nbsp;object</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">8</td>
- <td class="normal">&nbsp;&nbsp;object</td>
- </tr>
- <tr>
- <td class="linenum">9</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;method x = 2</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">9</td>
- <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;method x = 2</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/object.ml_10">10</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;inherit bar</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">10</td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inherit bar</td>
- </tr>
- <tr>
- <td class="linenum">11</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">11</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- </tr>
- <tr>
- <td class="linenum">12</td>
- <td class="normal"></td>
- <td width="16">&nbsp;</td>
- <td class="linenum">12</td>
- <td class="normal"></td>
- </tr>
- <tr>
- <td class="linenum">13</td>
- <td class="normal">class foo =</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">13</td>
- <td class="normal">class foo =</td>
- </tr>
- <tr>
- <td class="linenum">14</td>
- <td class="normal">&nbsp;&nbsp;object(this)</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">14</td>
- <td class="normal">&nbsp;&nbsp;object(this)</td>
- </tr>
- <tr>
- <td class="linenum"><a name="failing/object.ml_15">15</a></td>
- <td class="modified">&nbsp;&nbsp;&nbsp;&nbsp;inherit bar</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">15</td>
- <td class="modified">&nbsp;&nbsp;inherit bar</td>
- </tr>
- <tr>
- <td class="linenum">16</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- <td width="16">&nbsp;</td>
- <td class="linenum">16</td>
- <td class="normal">&nbsp;&nbsp;end</td>
- </tr>
-</table>
-<hr/>
-<i>Generated by <b>diff2html</b> on 2013-04-02 13:16:19</i>
+<i>Generated by <b>diff2html</b> on 2013-04-02 13:21:13</i>
</body>
</html>
File renamed without changes.

0 comments on commit 641b641

Please sign in to comment.