From 2f663a2e248844f697a4018c41e837a2496a4551 Mon Sep 17 00:00:00 2001 From: David Dixon-Peugh Date: Fri, 28 Jun 2002 17:30:01 +0000 Subject: [PATCH] Test data for UseSingletonRule git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@126 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/test-data/design/UseSingleton1.java | 13 +++++++++++++ pmd/test-data/design/UseSingleton2.java | 9 +++++++++ pmd/test-data/design/UseSingleton3.java | 7 +++++++ 3 files changed, 29 insertions(+) create mode 100644 pmd/test-data/design/UseSingleton1.java create mode 100644 pmd/test-data/design/UseSingleton2.java create mode 100644 pmd/test-data/design/UseSingleton3.java diff --git a/pmd/test-data/design/UseSingleton1.java b/pmd/test-data/design/UseSingleton1.java new file mode 100644 index 0000000000..372d623e73 --- /dev/null +++ b/pmd/test-data/design/UseSingleton1.java @@ -0,0 +1,13 @@ +public class UseSingleton1 +{ + // Should trigger UseSingleton rule? + public UseSingleton1() { } + + public static void doSomething() { + // Blah, blah, blah. + } + + public static void main(String args[]) { + doSomething(); + } +} diff --git a/pmd/test-data/design/UseSingleton2.java b/pmd/test-data/design/UseSingleton2.java new file mode 100644 index 0000000000..a0934a9061 --- /dev/null +++ b/pmd/test-data/design/UseSingleton2.java @@ -0,0 +1,9 @@ +public class UseSingleton2 +{ + // Should not trigger UseSingleton rule. + public UseSingleton2() { } + + public void doSomething() { } + + public static void main(String args[]) { } +} diff --git a/pmd/test-data/design/UseSingleton3.java b/pmd/test-data/design/UseSingleton3.java new file mode 100644 index 0000000000..6d8b474cb2 --- /dev/null +++ b/pmd/test-data/design/UseSingleton3.java @@ -0,0 +1,7 @@ +public class UseSingleton3 +{ + // Should trigger it. + public static void doSomething1() { } + public static void doSomething2() { } + public static void doSomething3() { } +}