[modelica] Add rule test for ClassStartNameEqualsEndName
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.modelica.rule.bestpractices;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
public class ClassStartNameEqualsEndNameTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<test-data
|
||||
xmlns="http://pmd.sourceforge.net/rule-tests"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">
|
||||
<test-code>
|
||||
<description>Valid example</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
package Test
|
||||
end Test;
|
||||
]]></code>
|
||||
<source-type>modelica</source-type>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description>Invalid example</description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-linenumbers>1</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
package Test
|
||||
end OtherName;
|
||||
]]></code>
|
||||
<source-type>modelica</source-type>
|
||||
</test-code>
|
||||
</test-data>
|
Reference in New Issue
Block a user