summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Feng2011-08-19 04:34:45 (EDT)
committer xgu2011-08-31 02:00:51 (EDT)
commit1d480dc36e3cfabdf81e144e16621249f960673c (patch)
tree19a9d77b42c7ecf8a90820f1a5e3461886447c02
parent5cf43bc6d87f1dc839a412b972b5212223a0c9e9 (diff)
downloadorg.eclipse.birt-1d480dc36e3cfabdf81e144e16621249f960673c.zip
org.eclipse.birt-1d480dc36e3cfabdf81e144e16621249f960673c.tar.gz
org.eclipse.birt-1d480dc36e3cfabdf81e144e16621249f960673c.tar.bz2
Adjust "between" filter test so that the evaluation results are consistent with SQL's "between" condition. [42136]
-rw-r--r--data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java b/data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java
index 7d8c8f9..8e54318 100644
--- a/data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java
+++ b/data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java
@@ -43,11 +43,12 @@ public class ScriptEvalTest extends TestCase
protected void setUp() throws Exception
{
scontext = new ScriptContext();
- scope = Context.getCurrentContext( ).initStandardObjects();
+ scope = Context.enter( ).initStandardObjects();
}
protected void tearDown() throws Exception
{
+ Context.exit( );
scontext.close( );
}
@@ -538,7 +539,7 @@ public class ScriptEvalTest extends TestCase
IConditionalExpression.OP_NOT_BETWEEN,
new Timestamp( ( new GregorianCalendar( 2004, 1, 3 ) ).getTimeInMillis( ) ),
new Timestamp( ( new GregorianCalendar( 2004, 1, 1 ) ).getTimeInMillis( ) ) );
- assertResult( result, false );
+ assertResult( result, true );
result = ScriptEvalUtil.evalConditionalExpr(
new Date( ( new GregorianCalendar( 2004, 1, 2 ) ).getTimeInMillis( ) ),
@@ -580,7 +581,7 @@ public class ScriptEvalTest extends TestCase
IConditionalExpression.OP_BETWEEN,
new Double( 20 ),
new BigDecimal( 9.9 ) );
- assertResult( result, true );
+ assertResult( result, false );
//Nov 1, 2001 between "Oct 20, 2001 12:00:00 AM"
// and "Nov 20, 2001 12:00:00 AM"