Reformat html test data for DiagnosticMessageTest

This commit is contained in:
Svetlana Isakova
2014-04-18 15:59:09 +04:00
parent 1e8a8d2861
commit efa00782a4
17 changed files with 238 additions and 556 deletions
@@ -1,10 +1,3 @@
<!-- conflictingOverloadsClass1 -->
<html>
'<b>
internal</b>
<b>
final</b>
<b>
fun</b>
lol(x: kotlin.Int): kotlin.Int'<br />
is already defined in conflictingOverloads</html>
'<b>internal</b> <b>final</b> <b>fun</b> lol(x: kotlin.Int): kotlin.Int'<br />is already defined in conflictingOverloads</html>
@@ -1,10 +1,3 @@
<!-- conflictingOverloadsClass2 -->
<html>
'<b>
internal</b>
<b>
final</b>
<b>
fun</b>
lol(y: kotlin.Int): kotlin.Int'<br />
is already defined in conflictingOverloads</html>
'<b>internal</b> <b>final</b> <b>fun</b> lol(y: kotlin.Int): kotlin.Int'<br />is already defined in conflictingOverloads</html>
@@ -1,118 +1,48 @@
<!-- conflictingSubstitutions1 -->
<html>
Type inference failed: Cannot infer type parameter <b>
T</b>
in <table>
Type inference failed: Cannot infer type parameter <b>T</b> in
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, E : java.lang.Cloneable>
writeToMyList</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l: MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: kotlin.Unit <b>
where</b>
E : java.io.Closeable</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T, E : java.lang.Cloneable> writeToMyList</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">l: MyList<`in T>,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">t: T</td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: kotlin.Unit <b>where</b> E : java.io.Closeable</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
None of the following substitutions</td>
<td colspan="8" style="white-space:nowrap;">None of the following substitutions</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
MyList&lt;in kotlin.Any&gt;</b>
</font>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>MyList<`in kotlin.Any></b></font><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Any</b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;in kotlin.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
kotlin.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>MyList<`in kotlin.Int></b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>kotlin.Int</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
can be applied to</td>
<td colspan="8" style="white-space:nowrap;">can be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;kotlin.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>MyList<`kotlin.Int></b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Any</b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
</html>
@@ -1,116 +1,48 @@
<!-- conflictingSubstitutions2 -->
<html>
Type inference failed: Cannot infer type parameter <b>
T</b>
in <table>
Type inference failed: Cannot infer type parameter <b>T</b> in
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
constructor</b>
Cons&lt;T, E : java.lang.Cloneable>
</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l: MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>constructor</b> Cons<`T, E : java.lang.Cloneable></td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">l: MyList<`in T>,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">t: T</td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;"></td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
None of the following substitutions</td>
<td colspan="8" style="white-space:nowrap;">None of the following substitutions</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
MyList&lt;in kotlin.Any&gt;</b>
</font>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>MyList<`in kotlin.Any></b></font><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Any</b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;in kotlin.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
kotlin.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>MyList<`in kotlin.Int></b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>kotlin.Int</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
can be applied to</td>
<td colspan="8" style="white-space:nowrap;">can be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
MyList&lt;kotlin.Int&gt;</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Any</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>MyList<`kotlin.Int></b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Any</b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,48 +1,25 @@
<!-- functionPlaceholder1 -->
<html>
Type inference failed: <table>
Type inference failed:
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T, R> foo</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">a: A<`T, R></td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: A<`T, R></td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
<td colspan="7" style="white-space:nowrap;">cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
() &rarr; ???</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>() &rarr; ???</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,48 +1,25 @@
<!-- functionPlaceholder2 -->
<html>
Type inference failed: <table>
Type inference failed:
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T, R> foo</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">a: A<`T, R></td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: A<`T, R></td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
<td colspan="7" style="white-space:nowrap;">cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
(???) &rarr; ???</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(???) &rarr; ???</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,48 +1,25 @@
<!-- functionPlaceholder3 -->
<html>
Type inference failed: <table>
Type inference failed:
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, R>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T, R> foo</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">a: A<`T, R></td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: A<`T, R></td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
<td colspan="7" style="white-space:nowrap;">cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
(kotlin.Int) &rarr; kotlin.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>(kotlin.Int) &rarr; kotlin.Int</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,23 +1,14 @@
<!-- numberValueTypes1 -->
<html>
Type inference failed. Expected type mismatch: <table>
Type inference failed. Expected type mismatch:
<table>
<tr>
<td>
required: </td>
<td>
<b>
kotlin.Int</b>
</td>
<td>required: </td>
<td><b>kotlin.Int</b></td>
</tr>
<tr>
<td>
found: </td>
<td>
<font color=red>
<b>
kotlin.Long</b>
</font>
</td>
<td>found: </td>
<td><font color=red><b>kotlin.Long</b></font></td>
</tr>
</table>
</html>
@@ -1,23 +1,14 @@
<!-- numberValueTypes2 -->
<html>
Type inference failed. Expected type mismatch: <table>
Type inference failed. Expected type mismatch:
<table>
<tr>
<td>
required: </td>
<td>
<b>
kotlin.Byte</b>
</td>
<td>required: </td>
<td><b>kotlin.Byte</b></td>
</tr>
<tr>
<td>
found: </td>
<td>
<font color=red>
<b>
kotlin.Int</b>
</font>
</td>
<td>found: </td>
<td><font color=red><b>kotlin.Int</b></font></td>
</tr>
</table>
</html>
@@ -1,48 +1,25 @@
<!-- numberValueTypes3 -->
<html>
Type inference failed: <table>
Type inference failed:
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T>
foo</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l: kotlin.List&lt;T&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: kotlin.Unit</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T> foo</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">l: kotlin.List<`T></td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: kotlin.Unit</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
cannot be applied to</td>
<td colspan="7" style="white-space:nowrap;">cannot be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
kotlin.Int</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>kotlin.Int</b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,116 +1,48 @@
<!-- numberValueTypes4 -->
<html>
Type inference failed: Cannot infer type parameter <b>
T</b>
in <table>
Type inference failed: Cannot infer type parameter <b>T</b> in
<table>
<tr>
<td width="10%">
</td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T>
bar</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t: T,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l: kotlin.MutableList&lt;T&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: kotlin.Unit</td>
<td width="10%"></td>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;"><b>fun</b> <`T> bar</td>
<td style="white-space:nowrap;font-weight:bold;">(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">t: T,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">l: kotlin.MutableList<`T></td>
<td style="white-space:nowrap;font-weight:bold;">)</td>
<td style="white-space:nowrap;font-weight:bold;">: kotlin.Unit</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
None of the following substitutions</td>
<td colspan="8" style="white-space:nowrap;">None of the following substitutions</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
kotlin.String</b>
</font>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.MutableList&lt;kotlin.String&gt;</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>kotlin.String</b></font><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.MutableList<`kotlin.String></b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Int</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<font color=red>
<b>
kotlin.MutableList&lt;kotlin.Int&gt;</b>
</font>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Int</b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><font color=red><b>kotlin.MutableList<`kotlin.Int></b></font></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
can be applied to</td>
<td colspan="8" style="white-space:nowrap;">can be applied to</td>
</tr>
<tr>
<td width="10%">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
</td>
<td style="white-space:nowrap;">
<b>
(</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.Int</b>
<b>
,</b>
</td>
<td align="right" style="white-space:nowrap;">
<b>
kotlin.MutableList&lt;kotlin.String&gt;</b>
</td>
<td style="white-space:nowrap;">
<b>
)</b>
</td>
<td width="10%"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"></td>
<td style="white-space:nowrap;"><b>(</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.Int</b><b>,</b></td>
<td align="right" style="white-space:nowrap;"><b>kotlin.MutableList<`kotlin.String></b></td>
<td style="white-space:nowrap;"><b>)</b></td>
</tr>
</table>
</html>
@@ -1,23 +1,14 @@
<!-- typeInferenceExpectedTypeMismatch1 -->
<html>
Type inference failed. Expected type mismatch: <table>
Type inference failed. Expected type mismatch:
<table>
<tr>
<td>
required: </td>
<td>
<b>
kotlin.String</b>
</td>
<td>required: </td>
<td><b>kotlin.String</b></td>
</tr>
<tr>
<td>
found: </td>
<td>
<font color=red>
<b>
kotlin.Int</b>
</font>
</td>
<td>found: </td>
<td><font color=red><b>kotlin.Int</b></font></td>
</tr>
</table>
</html>
@@ -1,23 +1,14 @@
<!-- typeInferenceExpectedTypeMismatch2 -->
<html>
Type inference failed. Expected type mismatch: <table>
Type inference failed. Expected type mismatch:
<table>
<tr>
<td>
required: </td>
<td>
<b>
kotlin.List&lt;kotlin.Int&gt;</b>
</td>
<td>required: </td>
<td><b>kotlin.List<`kotlin.Int></b></td>
</tr>
<tr>
<td>
found: </td>
<td>
<font color=red>
<b>
kotlin.Set&lt;kotlin.Int&gt;</b>
</font>
</td>
<td>found: </td>
<td><font color=red><b>kotlin.Set<`kotlin.Int></b></font></td>
</tr>
</table>
</html>
@@ -1,23 +1,14 @@
<!-- typeInferenceExpectedTypeMismatch3 -->
<html>
Type inference failed. Expected type mismatch: <table>
Type inference failed. Expected type mismatch:
<table>
<tr>
<td>
required: </td>
<td>
<b>
kotlin.Set&lt;kotlin.String&gt;</b>
</td>
<td>required: </td>
<td><b>kotlin.Set<`kotlin.String></b></td>
</tr>
<tr>
<td>
found: </td>
<td>
<font color=red>
<b>
kotlin.Set&lt;kotlin.Int&gt;</b>
</font>
</td>
<td>found: </td>
<td><font color=red><b>kotlin.Set<`kotlin.Int></b></font></td>
</tr>
</table>
</html>
@@ -1,17 +1,14 @@
<!-- typeMismatchWithNothing1 -->
<html>
Type mismatch.<table>
Type mismatch.
<table>
<tr>
<td>
Required:</td>
<td>
b.A&lt;???&gt;</td>
<td>Required:</td>
<td>b.A<`???></td>
</tr>
<tr>
<td>
Found:</td>
<td>
kotlin.Nothing?</td>
<td>Found:</td>
<td>kotlin.Nothing?</td>
</tr>
</table>
</html>
@@ -42,6 +42,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import static org.jetbrains.jet.plugin.highlighter.formatHtml.FormatHtmlPackage.formatHtml;
public abstract class AbstractDiagnosticMessageTest extends JetLiteFixture {
private static final String DIAGNOSTICS_NUMBER_DIRECTIVE = "DIAGNOSTICS_NUMBER";
private static final String DIAGNOSTICS_DIRECTIVE = "DIAGNOSTICS";
@@ -98,7 +100,7 @@ public abstract class AbstractDiagnosticMessageTest extends JetLiteFixture {
String readableDiagnosticText;
String extension;
if (messageType != MessageType.TEXT && IdeErrorMessages.MAP.get(diagnostic.getFactory()) != null) {
readableDiagnosticText = IdeErrorMessages.RENDERER.render(diagnostic).replaceAll(">", ">\n");
readableDiagnosticText = formatHtml(IdeErrorMessages.RENDERER.render(diagnostic));
extension = MessageType.HTML.extension;
}
else {
@@ -0,0 +1,40 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.plugin.highlighter.formatHtml
private fun formatHtml(html: String): String {
var message = html
fun wrapTagWithNewLines(tagName: String, isSubTag: Boolean) {
val openTagPart = "<$tagName"
val indent = if (isSubTag) " " else ""
message = message.replace(openTagPart, "\n$indent$openTagPart")
val tagPart = if (isSubTag) "/$tagName>" else "$tagName>"
message = message.replace(tagPart, "$tagPart\n")
}
for (tag in listOf("html", "ul", "table", "tr")) {
wrapTagWithNewLines(tag, isSubTag = false)
}
for (tag in listOf("li", "td")) {
wrapTagWithNewLines(tag, isSubTag = true)
}
message = message.replace("<br/>", "<br/>\n").replace("&nbsp;", " ")
message = message.replace("&lt;", "<`").replace("&gt;", ">")
message = message.split("(\r|\n|\r\n)+").map { s -> s.trimTrailing() }.filter { s -> !s.isEmpty() }.makeString("\n")
return message
}