Skip to content

Commit

Permalink
MONDRIAN: Test case for MONDRIAN-7, "Heterogeneous axis gives wrong r…
Browse files Browse the repository at this point in the history
…esults".

[git-p4: depot-paths = "//open/mondrian/": change = 12587]
  • Loading branch information
julianhyde committed Apr 10, 2009
1 parent a12687c commit 01fcbba
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions testsrc/main/mondrian/test/BasicQueryTest.java
Expand Up @@ -6393,6 +6393,27 @@ public void testEmptySqlBug() {
expectedResult4);
}

/**
* Tests bug <a href="http://jira.pentaho.com/browse/MONDRIAN-7">MONDRIAN-7,
* "Heterogeneous axis gives wrong results"</a>. The bug is a misnomer;
* heterogeneous axes should give an error.
*/
public void testHeterogeneousAxis() {
// SSAS2005 gives error:
// Query (1, 8) Two sets specified in the function have different
// dimensionality.
assertThrows(
"select {[Measures].[Unit Sales], [Gender].Members} on 0,\n"
+ " [Store].[USA].Children on 1\n"
+ "from [Sales]",
"All arguments to function '{}' must have same hierarchy.");
assertThrows(
"select {[Marital Status].Members, [Gender].Members} on 0,\n"
+ " [Store].[USA].Children on 1\n"
+ "from [Sales]",
"All arguments to function '{}' must have same hierarchy.");
}

/**
* A simple user-defined function which adds one to its argument, but
* sleeps 1 ms before doing so.
Expand Down

0 comments on commit 01fcbba

Please sign in to comment.