Skip to content

Commit

Permalink
MONDRIAN: generate a Java-quoted version of periodstodate
Browse files Browse the repository at this point in the history
test, and remove some escape characters which were preventing
       generateDiffRepositoryJUnit output from compiling

[git-p4: depot-paths = "//open/mondrian/": change = 11592]
  • Loading branch information
jsichi committed Sep 21, 2008
1 parent 0915b20 commit 41a81c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions testsrc/main/mondrian/olap/fun/FunctionTest.java
Expand Up @@ -6646,6 +6646,26 @@ public void testPeriodsToDate() {
"Row #1: 45,539.69\n" +
"Row #1: 89,598.48\n" +
"Row #1: 139,628.35\n"));

assertQueryReturns(
"select\n" +
"{[Measures].[Unit Sales]} on columns,\n" +
"periodstodate(\n" +
" [Product].[Product Category],\n" +
" [Product].[Food].[Baked Goods].[Bread].[Muffins]) on rows\n" +
"from [Sales]\n" +
"",
fold(
"Axis #0:\n" +
"{}\n" +
"Axis #1:\n" +
"{[Measures].[Unit Sales]}\n" +
"Axis #2:\n" +
"{[Product].[All Products].[Food].[Baked Goods].[Bread].[Bagels]}\n" +
"{[Product].[All Products].[Food].[Baked Goods].[Bread].[Muffins]}\n" +
"Row #0: 815\n" +
"Row #1: 3,497\n" +
""));
}

public void testSetToStr() {
Expand Down
2 changes: 1 addition & 1 deletion testsrc/main/mondrian/test/clearview/MiscTest.ref.xml
Expand Up @@ -137,7 +137,7 @@ With
Set [*BASE_MEMBERS_Measures] as '{[Measures].[*FORMATTED_MEASURE_0]}'
Set [*BASE_MEMBERS_Gender] as '[Gender].[Gender].Members'
Set [*NATIVE_MEMBERS_Gender] as 'Generate([*NATIVE_CJ_SET], {[Gender].CurrentMember})'
Set [*BASE_MEMBERS_Product] as 'Filter([Product].[Product Name].Members,[Product].CurrentMember.Name Not Matches ("(?i).*\QLow Fat Bologna\E.*"))'
Set [*BASE_MEMBERS_Product] as 'Filter([Product].[Product Name].Members,[Product].CurrentMember.Name Not Matches ("(?i).*Low Fat Bologna.*"))'
Set [*NATIVE_MEMBERS_Product] as 'Generate([*NATIVE_CJ_SET], {[Product].CurrentMember})'
Set [*BASE_MEMBERS_Time] as '{[Time].[1997]}'
Set [*NATIVE_MEMBERS_Time] as 'Generate([*NATIVE_CJ_SET], {[Time].CurrentMember})'
Expand Down

0 comments on commit 41a81c4

Please sign in to comment.