-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestcasemachine.java
More file actions
64 lines (43 loc) · 1.55 KB
/
testcasemachine.java
File metadata and controls
64 lines (43 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codeanalyzer;
import javax.swing.tree.*;
/**
*
* @author susdeshp
*/
public class testcasemachine {
private StringBuffer testcases;
private String Dummystr2;
public testcasemachine(){
testcases = new StringBuffer("");
}
public StringBuffer gettestcases(DefaultMutableTreeNode codetree, StringBuffer path2){
StringBuffer Dummy,x;
String y = path2.toString();
StringBuffer path = new StringBuffer(y);
String Dummystr;
TreeNode tempNode;
int childcount = codetree.getChildCount();
for (int i = 0; i < childcount; i++){
tempNode = codetree.getChildAt(i);
if(tempNode.isLeaf()){
Dummystr = path + "->" + tempNode.toString();
//testcases = testcases.append(Dummystr);
//testcases = testcases.append("\n");
}
else {
y = path.toString();
Dummy = new StringBuffer(y);
Dummy = Dummy.append("->");
Dummy = Dummy.append(tempNode.toString());
testcases = testcases.append(Dummy);
testcases = testcases.append("\n");
x = gettestcases((DefaultMutableTreeNode)tempNode, Dummy);
}
}
return testcases;
}
}