<s> from nose . tools import eq_ <EOL> from js_helper import TestCase <EOL> class TestBinaryOperators ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> def do_expr ( self , expr , output ) : <EOL> self . setUp ( ) <EOL> self . run_script ( "<STR_LIT>" % expr ) <EOL> self . assert_var_eq ( "<STR_LIT:x>" , output ) <EOL> def test_boolean_comp ( self ) : <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> def test_string_comp ( self ) : <EOL> yield self . do_expr , '<STR_LIT>' , False <EOL> yield self . do_expr , '<STR_LIT>' , True <EOL> yield self . do_expr , '<STR_LIT>' , True <EOL> yield self . do_expr , '<STR_LIT>' , False <EOL> yield self . do_expr , '<STR_LIT>' , False <EOL> yield self . do_expr , '<STR_LIT>' , True <EOL> def test_signed_zero_comp ( self ) : <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> def test_signed_zero ( self ) : <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , False <EOL> def test_typecasting ( self ) : <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> yield self . do_expr , "<STR_LIT>" , True <EOL> def test_additive_typecasting ( self ) : <EOL> self . run_script ( """<STR_LIT>""" ) <EOL> self . assert_var_eq ( "<STR_LIT:a>" , "<STR_LIT>" ) <EOL> self . assert_var_eq ( "<STR_LIT:b>" , "<STR_LIT>" ) <EOL> self . assert_var_eq ( "<STR_LIT:c>" , "<STR_LIT>" ) <EOL> self . assert_var_eq ( "<STR_LIT:d>" , "<STR_LIT>" ) <EOL> self . assert_var_eq ( "<STR_LIT:e>" , "<STR_LIT>" ) <EOL> self . assert_var_eq ( "<STR_LIT:f>" , "<STR_LIT>" ) <EOL> def test_addition_expressions ( self ) : <EOL> self . run_script ( """<STR_LIT>""" ) <EOL> self . assert_var_eq ( "<STR_LIT:a>" , <NUM_LIT:1> ) <EOL> self . assert_var_eq ( "<STR_LIT:b>" , <NUM_LIT:1> ) <EOL> self . assert_var_eq ( "<STR_LIT:c>" , <NUM_LIT> ) <EOL> self . assert_var_eq ( "<STR_LIT:d>" , <NUM_LIT> ) </s>
