Skip to content

Commit

Permalink
Oops. Fix tests.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@351 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Aug 12, 2010
1 parent 7e99a82 commit 9044e9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,8 @@ private void checkUnparsedMdx(SelectNode select) {
checkUnparsedMdx(
select,
"WITH\n"
+ "MEMBER [Measures].[Foo] AS '[Measures].[Bar]', FORMAT_STRING = \"xxx\"\n"
+ "MEMBER [Measures].[Foo] AS\n"
+ " [Measures].[Bar], FORMAT_STRING = \"xxx\"\n"
+ "SELECT\n"
+ "{[Gender]} ON COLUMNS,\n"
+ "{[Store].Children} ON ROWS\n"
Expand Down Expand Up @@ -1410,7 +1411,8 @@ public void testUnparsing() {
checkUnparsedMdx(
select,
"WITH\n"
+ "MEMBER [Measures].[Foo] AS '[Measures].[Bar]', FORMAT_STRING = \"xxx\"\n"
+ "MEMBER [Measures].[Foo] AS\n"
+ " [Measures].[Bar], FORMAT_STRING = \"xxx\"\n"
+ "SELECT\n"
+ "{[Gender]} ON COLUMNS,\n"
+ "{[Store].Children} ON ROWS\n"
Expand Down
12 changes: 8 additions & 4 deletions testsrc/org/olap4j/test/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public void testUnparse() {
+ "from [Sales]\n"
+ "where [Marital Status].[S]",
"WITH\n"
+ "MEMBER [Measures].[Foo] AS '123.0'\n"
+ "MEMBER [Measures].[Foo] AS\n"
+ " 123.0\n"
+ "SELECT\n"
+ "{[Measures].members} ON COLUMNS,\n"
+ "CrossJoin([Product].members, {[Gender].Children}) ON ROWS\n"
Expand Down Expand Up @@ -469,7 +470,8 @@ public void testCaseTest() {
+ " ' case when x = y then \"eq\" when x < y then \"lt\" else \"gt\" end '"
+ "select {[foo]} on axis(0) from cube",
"WITH\n"
+ "MEMBER [Measures].[Foo] AS 'CASE WHEN (x = y) THEN \"eq\" WHEN (x < y) THEN \"lt\" ELSE \"gt\" END'\n"
+ "MEMBER [Measures].[Foo] AS\n"
+ " CASE WHEN (x = y) THEN \"eq\" WHEN (x < y) THEN \"lt\" ELSE \"gt\" END\n"
+ "SELECT\n"
+ "{[foo]} ON COLUMNS\n"
+ "FROM cube");
Expand All @@ -481,7 +483,8 @@ public void testCaseSwitch() {
+ " ' case x when 1 then 2 when 3 then 4 else 5 end '"
+ "select {[foo]} on axis(0) from cube",
"WITH\n"
+ "MEMBER [Measures].[Foo] AS 'CASE x WHEN 1.0 THEN 2.0 WHEN 3.0 THEN 4.0 ELSE 5.0 END'\n"
+ "MEMBER [Measures].[Foo] AS\n"
+ " CASE x WHEN 1.0 THEN 2.0 WHEN 3.0 THEN 4.0 ELSE 5.0 END\n"
+ "SELECT\n"
+ "{[foo]} ON COLUMNS\n"
+ "FROM cube");
Expand Down Expand Up @@ -735,7 +738,8 @@ public void testLargePrecision() {
+ "from Sales\n"
+ "where ([Time].[1997].[Q2].[4])",
"WITH\n"
+ "MEMBER [Measures].[Small Number] AS '([Measures].[Store Sales] / 9000.0)'\n"
+ "MEMBER [Measures].[Small Number] AS\n"
+ " ([Measures].[Store Sales] / 9000.0)\n"
+ "SELECT\n"
+ "{[Measures].[Small Number]} ON COLUMNS,\n"
+ "{Filter([Product].[Product Department].members, (([Measures].[Small Number] >= 0.3) AND ([Measures].[Small Number] <= 0.5000001234)))} ON ROWS\n"
Expand Down

0 comments on commit 9044e9a

Please sign in to comment.