Skip to content

Commit

Permalink
MONDRIAN: Adds a test for isEmpty with calculated members.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 14201]
  • Loading branch information
lucboudreau committed Apr 13, 2011
1 parent 7f8d32c commit ea7e93d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions testsrc/main/mondrian/olap/fun/FunctionTest.java
Expand Up @@ -519,6 +519,20 @@ public void testIsEmptyQuery() {
+ " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer],\n"
+ " [Measures].[Foo])",
desiredResult);

assertQueryReturns(
"WITH MEMBER [Measures].[Foo] AS 'Iif([Measures].[Bar] IS EMPTY, 1, [Measures].[Bar])'\n"
+ "MEMBER [Measures].[Bar] AS 'CAST(\"42\" AS INTEGER)'\n"
+ "SELECT {[Measures].[Unit Sales], [Measures].[Foo]} on columns\n"
+ "FROM Sales\n"
+ "WHERE ([Time].[1998].[Q4].[12])",
"Axis #0:\n"
+ "{[Time].[1998].[Q4].[12]}\n"
+ "Axis #1:\n"
+ "{[Measures].[Unit Sales]}\n"
+ "{[Measures].[Foo]}\n"
+ "Row #0: \n"
+ "Row #0: 42\n");
}

public void testIsEmptyWithAggregate() {
Expand Down

0 comments on commit ea7e93d

Please sign in to comment.