Skip to content

Commit

Permalink
Fixed a problem in ParentChildHierarchyTest by allowing for a 3rd alt…
Browse files Browse the repository at this point in the history
…ernative error message.

[git-p4: depot-paths = "//open/mondrian/": change = 2907]
  • Loading branch information
ebb committed Dec 2, 2004
1 parent 5f44bbe commit b19d590
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion testsrc/main/mondrian/test/ParentChildHierarchyTest.java
Expand Up @@ -203,8 +203,18 @@ public void testGenuineCycle() {
"{[Time].[1997].[Q2]}" + nl +
"Row #0: (null)" + nl +
"Row #0: #ERR: mondrian.olap.fun.MondrianEvaluationException: Infinite loop while evaluating calculated member '[Measures].[Foo]'; context stack is {([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2])}" + nl;
final String expected3 = "Axis #0:" + nl +
"{}" + nl +
"Axis #1:" + nl +
"{[Measures].[Unit Sales]}" + nl +
"{[Measures].[Foo]}" + nl +
"Axis #2:" + nl +
"{[Time].[1997].[Q2]}" + nl +
"Row #0: (null)" + nl +
"Row #0: #ERR: mondrian.olap.fun.MondrianEvaluationException: Infinite loop while evaluating calculated member '[Measures].[Foo]'; context stack is {([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2].[4]), ([Store].[All Stores].[Mexico], [Time].[1997].[Q2])}" + nl;
if (!resultString.equals(expected) &&
!resultString.equals(expected2)) {
!resultString.equals(expected2) &&
!resultString.equals(expected3)) {
System.out.println(resultString);
Assert.assertEquals(expected, resultString);
}
Expand Down

0 comments on commit b19d590

Please sign in to comment.