01: /*
02: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18: package test.org.mandarax.reference;
19:
20: import java.util.List;
21: import java.util.Vector;
22:
23: /**
24: * Loop checker test 1.
25: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
26: * @version 3.4 <7 March 05>
27: * @since 1.3
28: */
29: public class TestSimpleLoopChecker5 extends TestSimpleLoopChecker {
30:
31: /**
32: * Constructor.
33: */
34: public TestSimpleLoopChecker5() {
35: super ();
36: }
37:
38: /**
39: * Get the max pattern length.
40: * @return a value
41: */
42: public int getMaxPatternLength() {
43: return 3;
44: }
45:
46: /**
47: * Get the min recurrence number.
48: * @return a value
49: */
50: public int getMinRecurrenceNumber() {
51: return 100;
52: }
53:
54: /**
55: * Get the number of steps without checks.
56: * @return a value
57: */
58: public int getNumberOfStepsWithoutCheck() {
59: return 5;
60: }
61:
62: /**
63: * Get a sequence of objects to be tested.
64: * @return a list
65: */
66: public List getSequence() {
67: String A = "a";
68: String B = "b";
69: String C = "c";
70: Vector v = new Vector();
71:
72: v.add(A);
73: v.add(B);
74: v.add(C);
75:
76: return merge(v, 20);
77: }
78:
79: /**
80: * Indicates whether the loop checker should detect an infinite loop.
81: * returns false because the sequence is not long enough!
82: * @return a boolean
83: */
84: public boolean shouldDetectLoop() {
85: return false;
86: }
87: }
|