All the tests were run in demjava-beta-4, except the first two test, which found the bug in demjava-beta-3. All the bugs and the expected results are in each test directory. ***Directory shows the directory the tests are in. 1. Test the optional relationship, provide optional class Satisfy Req: 1.4, 1.5, 1.6, 2.3 .cd A = B . B = C D . D = . C = ["b"B]. strategy: A to D via C .input: b expected: : A ( : B ( : C ( : B ( : C ( ) : D ( ) ) ) ) ) ** This was a bug in demjava-beta-3 and was fixed in demjava-beta-4. 2. Test the optional relationship, provide non-optional class. Satisfy Req: 1.4, 1.5, 1.6, 2.3 .cd A = B . B = C D . D = . C = "b"B. strategy: A to D via C .input: b expected: Some explicit error message ** Prof. Lieberherr suggested it may be a JavaCC bug. ***Directory The above two tests are in token-hangs directory and were run under demjava-beta-3 and demjava-beta-4. Test 3 to 10 are focused on inheritance relationship of the class graph. 3. Parsing an abstract class Satisfy 1.4, 1.5, 1.6, 2.2 .cd A : B | C *common* . B = "b" D . C = D . D = . strategy: from A to D .input: empty expected:Some error message about not able to parse an abstract class. ***Directory: class/abstract 4. Added a concrete class to the above abstract class and parse Satisfy Req: 1.4, 1.5, 1.6, 2.1 .cd A = X. X: B | C *common* . B = "b" D . C = D . D = . strategy: from A to D .input: empty expected: : A ( : C ( : D ( ) ) ) ***Directory: /class/dummyConcrete 5. Test the construct edge from an abstract class if it gets flattened. Satisfy Req: 1.4, 1.5, 1.6, 2.1 .cd A = X. X: B | C *common* D. B = "b" D . C = D . D = . strategy: from A to D .input: empty expected: : A ( : C ( : D ( ) : D ( ) ) ) ***Directory: /class/flatten 6. Traversal starting from the abstract class, test if it find the correct path Satisfy Req: 1.4, 1.5, 1.6, 2.1 .cd A = X. X: B | C*common* . B = "b" D . C = D . D = . strategy: from X to D .input: b expected: : B ( : D ( ) ) ***Directory: /class/fromAbstract 7. Traversal starts from a class via another class to a third class. Satisfy Req: 1.4, 1.5, 1.6, 2.3 .cd .cd A = X. X: B | C*common* . B = "b" D . C = D . D = . strategy: from A via B to D .input: b expected: : A ( : B ( : D ( ) ) ) ***Directory: /class/fromviaB 8. The after token was put after the second child class, expected to have the same result as the above tests which has the token after the first child class. Satisfy Req: 1.4, 1.5, 1.6, 2.3 .cd A = X. X: B | C*common* . B = D . C = "c" D . D = . strategy: from A via B to D .input: empty expected: : A ( : B ( : D ( ) ) ) ***Directory: /class/tokenSecondEmpty **The output is the same as the expected, but still has one warnings which seems to ignore the token "c" 9. Similar test to test 8, but has "c" in the input file. Satisfy Req: 1.4, 1.5, 1.6, 2.3 expected: : A ( : C ( : D ( ) ) ) ***Directory: /class/tokenSecondC **Demjava ignores the token "c" which is after the second child C. Not sure if it is the correct behavior. 10. If an abstract class has a child and also has a constructive edge to another concrete class, find out if Demeter Java will print out the path. (Apstudio failed in this way) Satisfy Req: 1.4, 1.5, 1.6, 2.3 .cd A = X. C: X*common* D. D = . X = . strategy: from A to D .input: empty expected: : A ( : X ( : D ( ) ) ) ***Directory: /class/AXD The Test below are more focused on the different types of strategies. Test 11-12 are tests on the edges 11. bypass an edge Satisfy Req:1.4, 1.5, 1.6, 2.7 .cd A = X . X : B | C *common* . B = "b" F D . C = D E F . D = F . E = . F = . strategy: A { void f1() bypassing ->B,f,F to F (DisplayVisitor);} .input: b expected: : A ( : B ( : D ( : F ( ) ) ) ) ***Directory: /strategy/edge/bypass 12. via an edge Satisfy Req:1.4, 1.5, 1.6, 2.3 .cd A = X . X : B | C *common* . B = "b" D . C = D . D = . strategy: A { void f1() via =>X,C to D(DisplayVisitor);} .input: b expected: : A ( ) ***Directory: /strategy/edge/viaXCsimple **This hasn't been implemented, see the no-bug in the directory. Test 13-14 uses the only-through keyword on nodes and edges 13. only-through edge Satisfy Req:1.4, 1.5, 1.6, 2.5 .cd A = B B C . B = C . C = D . D = . strategy: A{ void f1() only-through -> A,b_1,B to B (DisplayVisitor);} .input: empty expected: : A ( : B ( ) ) ***Directory: /strategy/only-through/onlyedge 14. only-through nodes Satisfy Req:1.4, 1.5, 1.6, 2.5 .cd A = B B C . B = C . C = D . D = . strategy: A{ void f1() only-through C to D (DisplayVisitor);} .input: empty expected: : A ( : C ( : D ( ) ) ) ***Directory: /strategy/only-through/onlynode **This syntax seems not working on node, but works on edges. But the user manual says it should work for both. The next two tests works on the wild-cards strategy 15. from class to any class Satisfy Req:1.4, 1.5, 1.6, 2.5 .cd A = X . X : B | C*common* . C = D E . B = "b" F D . D = . E = . F = . strategy: A { void f1() to * (DisplayVisitor);} .input: empty expected: : A ( : C ( : D ( ) : E ( ) ) ) ***Directory: /strategy/wildcards/fromto **There can only print out path through C to any other classes. 16. from class via class to * Satisfy Req:1.4, 1.5, 1.6, 2.3 .cd A = X . X : B | C*common* . C = D E . B = "b" F D . D = . E = . F = . strategy: A { void f1() via C to * (DisplayVisitor);} .input: empty expected: : A ( : C ( : D ( ) : E ( ) ) ) ***Directory: /strategy/wildcards/viaC 17. This test use the star strategy. Satisfy Req:1.4, 1.5, 1.6, 2.1 .cd A = X . X : B | C *common* . B = "b" F D . C = D E F . D = F . E = . F = . strategy: A { void f1() to {D,E,F} (DisplayVisitor);} .input: b expected: : A ( : B ( : F ( ) : D ( : F ( ) ) ) ) ***Directory: /strategy/star 18. Join strategy Satisfy Req:1.4, 1.5, 1.6, 2.13 .cd A = X . X : B | C *common* . B = "b" D E . C = D E F . D = F . E = F. F = . strategy: A { void f1() via E bypassing D to F (DisplayVisitor);} .input: b expected: : A ( : B ( : E ( : F ( ) ) ) ) ***Directory: /strategy/join 19. Test the traversal if there are 3 child inherited from the same parent. Satisfy Req:1.4, 1.5, 1.6, 2.1 .cd A = X. X: B | C | E *common* . B = "b" D . C = "c" D . D = . E = D. strategy: A { int f1() to D (Count_C_Visitor, DisplayVisitor);} .input: c expected: : A ( : C ( : D ( ) ) ) ***Directory: /class/3child 20. Test home much depth of abstract class inheritance can be supported by Demeter/Java. Satisfy Req: 1.2a, 1.2b .cd A = Alt1 . Alt1 : Alt2 *common* . Alt2 : Alt3 *common* . Alt3 : Alt4 *common* . Alt4 : Alt5 *common* . Alt5 : Alt6 *common* . Alt6 : Alt7 *common* . Alt7 : Alt8 *common* . Alt8 : Alt9 *common* . Alt9 : Alt10 *common* . Alt10 : Alt11 *common* . Alt11 : Alt12 *common* . Alt12 : Alt13 *common* . Alt13 : Alt14 *common* . Alt14 : Alt15 *common* . Alt15 : Alt16 *common* . Alt16 : Alt17 *common* . Alt17 : Alt18 *common* . Alt18 : Alt19 *common* . Alt19 : Alt20 *common* . Alt20 : Alt21 *common* . Alt21 : Alt22 *common* . Alt22 : *common* "b" B . B = . strategy A { int f1() to B (Count_C_Visitor, DisplayVisitor);} .input: b expected: : A ( : B ()) ***Directory: /class/depth **In this test Demeter does not even get to run the traversal. It fails earlier while trying to parse the grammar created by the class dictionary. This graph was created with apstudio. 21. Test the name length and depth of the concrete class. Satisfy Req: 1.1, 1.2c .cd A = B. B = C. C = D. D = E. E = F. F = G. G = H. H = I. I = J. J = K. K = L. L = Mnnmnmnmnmnkjhkhghgfdsdfghhgfddfghhgfd. Mnnmnmnmnmnkjhkhghgfdsdfghhgfddfghhgfd = N. N = O. O = P. P = Q. Q = R. R = S. S = T. T = U. U = V. V = W. W = X. X = Y. Y = Z. Z = . strategy: A { int f1() via B to Z (Count_C_Visitor, DisplayVisitor);} .input: empty expected: : A ( : B ( : C ( : D ( : E ( : F ( : G ( : H ( : I ( : J ( : K ( : L ( : Mnnmnmnmnmnkjhkhghgfd sdfghhgfddfghhgfd ( : N ( : O (

: P ( : Q ( : R ( : S ( : T ( : U ( : V ( : W ( : X ( : Y ( : Z ( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )