Fix tests broken by enhanced RedundantSamConstructor inspection

- The inspection now works in more cases, so the test data had to be
updated accordingly
This commit is contained in:
Roman Golyshev
2020-02-20 17:27:41 +03:00
committed by Roman Golyshev
parent 22a5bc4144
commit 4042214bb2
19 changed files with 110 additions and 30 deletions
@@ -15,6 +15,17 @@
<problem_class severity="WARNING" attribute_key="WEAK_WARNING">Redundant SAM-constructors</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructor.kt</file>
<line>12</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorKt void test()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>Runnable</highlighted_element>
<offset>37</offset>
<length>8</length>
</problem>
<problem>
<file>redundantSamConstructor.kt</file>
<line>22</line>
@@ -39,6 +50,17 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM-constructor</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructor.kt</file>
<line>28</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorKt void test()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>Runnable</highlighted_element>
<offset>31</offset>
<length>8</length>
</problem>
<problem>
<file>redundantSamConstructor.kt</file>
<line>38</line>
@@ -47,6 +69,17 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM-constructor</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructor.kt</file>
<line>44</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorKt void test()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>Runnable</highlighted_element>
<offset>27</offset>
<length>8</length>
</problem>
<problem>
<file>redundantSamConstructorWithGenericsInReturnType.kt</file>
<line>9</line>
@@ -63,6 +96,17 @@
<problem_class severity="WARNING" attribute_key="WEAK_WARNING">Redundant SAM-constructors</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructorWithGenericsInReturnType.kt</file>
<line>12</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorWithGenericsInReturnTypeKt void testGenericsReturnType()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>JFunction0</highlighted_element>
<offset>39</offset>
<length>10</length>
</problem>
<problem>
<file>redundantSamConstructorWithGenericsInReturnType.kt</file>
<line>15</line>
@@ -87,6 +131,17 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM-constructor</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructorWithGenericsInReturnType.kt</file>
<line>21</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorWithGenericsInReturnTypeKt void testGenericsReturnType()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>JFunction0</highlighted_element>
<offset>31</offset>
<length>10</length>
</problem>
<problem>
<file>redundantSamConstructorWithGenericsInReturnType.kt</file>
<line>24</line>
@@ -173,4 +228,26 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
</problem>
<problem>
<file>redundantSamConstructorWithGenerics.kt</file>
<line>12</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorWithGenericsKt void testGenerics()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>JFunction1&lt;String&gt;</highlighted_element>
<offset>39</offset>
<length>18</length>
</problem>
<problem>
<file>redundantSamConstructorWithGenerics.kt</file>
<line>21</line>
<module>light_idea_test_case</module>
<entry_point TYPE="method" FQNAME="redundantSamConstructor.RedundantSamConstructorWithGenericsKt void testGenerics()" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant SAM constructor</problem_class>
<description>Redundant SAM-constructor</description>
<highlighted_element>JFunction1&lt;String&gt;</highlighted_element>
<offset>31</offset>
<length>18</length>
</problem>
</problems>