Jacek Caban : jscript: Added support for '==' CC expression.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 2 16:29:22 CDT 2014


Module: wine
Branch: master
Commit: d9e8c013c6346a0fec875fdd51b5a85b47191713
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d9e8c013c6346a0fec875fdd51b5a85b47191713

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Oct  2 14:36:35 2014 +0200

jscript: Added support for '==' CC expression.

---

 dlls/jscript/cc_parser.y | 2 +-
 dlls/jscript/tests/cc.js | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/dlls/jscript/cc_parser.y b/dlls/jscript/cc_parser.y
index 34ee90c..b22aef8 100644
--- a/dlls/jscript/cc_parser.y
+++ b/dlls/jscript/cc_parser.y
@@ -181,7 +181,7 @@ CCBitwiseANDExpression
 CCEqualityExpression
     : CCRelationalExpression        { $$ = $1; }
     | CCEqualityExpression tEQ CCRelationalExpression
-                                    { FIXME("'==' expression not implemented\n"); ctx->hres = E_NOTIMPL; YYABORT; }
+                                    { $$ = ccval_bool(get_ccnum($1) == get_ccnum($3)); }
     | CCEqualityExpression tNEQ CCRelationalExpression
                                     { $$ = ccval_bool(get_ccnum($1) != get_ccnum($3)); }
     | CCEqualityExpression tEQEQ CCRelationalExpression
diff --git a/dlls/jscript/tests/cc.js b/dlls/jscript/tests/cc.js
index 7ce3682..09ef285 100644
--- a/dlls/jscript/tests/cc.js
+++ b/dlls/jscript/tests/cc.js
@@ -146,6 +146,15 @@ ok(@test === -1, "@test = " + @test);
 @set @test = (true- at _jscript)
 ok(@test === 0, "@test = " + @test);
 
+ at set @test = (true==1)
+ok(@test === true, "@test = " + @test);
+
+ at set @test = (1==false+1)
+ok(@test === true, "@test = " + @test);
+
+ at set @test = (1+true==false+1)
+ok(@test === false, "@test = " + @test);
+
 @if (false)
     this wouldn not parse
 "@end




More information about the wine-cvs mailing list