From bc2f2d8f5090ad5cf49a6faec59868770b1ed166 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Tue, 17 Dec 2019 12:23:25 +0100 Subject: [PATCH] [modelica] Add integration smoke test --- .../net/sourceforge/pmd/it/AllRulesIT.java | 3 ++- .../test/resources/rulesets/all-modelica.xml | 18 ++++++++++++++++++ .../sample-source/modelica/SampleCode.mo | 17 +++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pmd-dist/src/test/resources/rulesets/all-modelica.xml create mode 100644 pmd-dist/src/test/resources/sample-source/modelica/SampleCode.mo diff --git a/pmd-dist/src/test/java/net/sourceforge/pmd/it/AllRulesIT.java b/pmd-dist/src/test/java/net/sourceforge/pmd/it/AllRulesIT.java index 778f0381de..649306a3cb 100644 --- a/pmd-dist/src/test/java/net/sourceforge/pmd/it/AllRulesIT.java +++ b/pmd-dist/src/test/java/net/sourceforge/pmd/it/AllRulesIT.java @@ -22,7 +22,8 @@ public class AllRulesIT extends AbstractBinaryDistributionTest { @Parameters public static Iterable languagesToTest() { // note: scala and wsdl have no rules - return Arrays.asList("java", "apex", "javascript", "jsp", "plsql", "pom", "visualforce", "velocitytemplate", "xml", "xsl"); + return Arrays.asList("java", "apex", "javascript", "jsp", "modelica", + "plsql", "pom", "visualforce", "velocitytemplate", "xml", "xsl"); } @Test diff --git a/pmd-dist/src/test/resources/rulesets/all-modelica.xml b/pmd-dist/src/test/resources/rulesets/all-modelica.xml new file mode 100644 index 0000000000..62fd3f2d1c --- /dev/null +++ b/pmd-dist/src/test/resources/rulesets/all-modelica.xml @@ -0,0 +1,18 @@ + + + + Every Modelica Rule in PMD + + + + + + + + + + + diff --git a/pmd-dist/src/test/resources/sample-source/modelica/SampleCode.mo b/pmd-dist/src/test/resources/sample-source/modelica/SampleCode.mo new file mode 100644 index 0000000000..315fa132ee --- /dev/null +++ b/pmd-dist/src/test/resources/sample-source/modelica/SampleCode.mo @@ -0,0 +1,17 @@ +package Test + package Inc + model X + end X; + model Y + end Y; + end Inc; + model A + model Y + end Y; + end A; + model B + extends A; + import Inc.*; + X x; + end B; +end OtherName;