<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscript/core/operators/bindings/5" class="C" scope="wmlscript:float" testtype="application" type="auto" source="wmls11#6.3.12" device="both">
  <assertion>The result type of the WMLScript operators is correct according to the table in section 7.3.12.
</assertion>
  <specnote>New for June 2000</specnote>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="<script1>#main('test','card1')"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,next)
{

	var result = 'fail';

	var tst = 0;

	var tst1 = tst++;
     	var tst2 = ++tst;
	var tst3 = tst--;
	var tst4 = --tst;
	var tst5 = +2;
	var tst6 = +1.3;
	var tst7 = -1;
	var tst8 = -1.1;
	var tst9 = ~1;
	var tst10 = !true;
	var tst11 = typeof "test";
	var tst12 = isvalid (2 / 1);
	var tst13 = 1 * 1;
	var tst14 = 1.1 * 1.1;
	var tst15 = 1 / 1;
	var tst16 = 1.1 / 1.1;
	var tst17 = 10 div 3;
	var tst18 = 10 % 3;
	var tst19 = 10 - 9;
	var tst20 = 10.1 - 9.1;
	var tst21 = 10 + 9;
	var tst22 = 10.1 + 9.1;
	var tst23 = "te" + "st";
	var tst24 = 10 << 2;
	var tst25 = 10 >> 2;
	var tst26 = 10 >>> 2;
	var tst27 = 2 < 10;
	var tst28 = 2.1 < 10.1;
	var tst29 = "pa" < "ss";
	var tst30 = 2 <= 10;
	var tst31 = 2.1 <= 10.1;
	var tst32 = "pa" <= "ss";
	var tst33 = 10 > 2;
	var tst34 = 10.1 > 2;
	var tst35 = "pa" > "ss";
	var tst36 = 10 >= 2;
	var tst37 = 10.1 >= 2.1;
	var tst38 = "pa" >= "ss";
	var tst39 = (3 == 3);
	var tst40 = (3.1 == 3.1);
	var tst41 = ("test" == "test");
	var tst42 = (3 != 3);
	var tst43 = (3.1 != 3.1);	
	var tst44 = ("test" != "test");
	var tst45 = 10 & 10;
	var tst46 = 10 ^ 10;
	var tst47 = 10 | 10;
	var tst48 = true && true;
	var tst49 = true || true;
	var tst50 = ("false" == "false" ? 10 : 20);	
	var tst51 = 10;
	tst51 *= 5;
	var tst52 = 10.1;
	tst52 *= 2.1;
	var tst53 = 10;
	tst53 /= 2;
	var tst54 = 10.1;
	tst54 /= 2;
	var tst55 = 10;
	tst55 div= 2;
	var tst56 = 10;
	tst56 %= 2;
	var tst57 = 10;
	tst57 += 5;
	var tst58 = 10.1;
	tst58 += 5;	
	var tst59 = "te";
	tst59 += "st";
	var tst60 = 10;
	tst60 <<= 2;
	var tst61 = 10;
	tst61 >>= 2;
	var tst62 = 10;
	tst62 >>>= 2;
	var tst63 = 10;
	tst63 &= 2;
	var tst64 = 10;
	tst64 ^= 2;
	var tst65 = 10;
	tst65 |= 2; 

	if ((typeof (tst1) == 0)
	    &&
	    (typeof (tst2) == 0)
	    &&
	    (typeof (tst3) == 0)
            &&
            (typeof (tst4) == 0)
            &&
            (typeof (tst5) == 0)
            &&
            (typeof (tst6) == 1)
            &&
            (typeof (tst7) == 0)
            &&
            (typeof (tst8) == 1)
            &&
            (typeof (tst9) == 0)
            && 
            (typeof (tst10) == 3)
            &&
            (typeof (tst11) == 0)
            &&
            (typeof (tst12) == 3)
            &&
	    (typeof (tst13) == 0)
	    &&
	    (typeof (tst14) == 1)
            &&
            (typeof (tst15) == 1)
            &&
            (typeof (tst16) == 1)
            &&
	    (typeof (tst17) == 0)
            &&
            (typeof (tst18) == 0)
            &&
            (typeof (tst19) == 0)
            &&
            (typeof (tst20) == 1)
            &&
            (typeof (tst21) == 0)
            &&
            (typeof (tst22) == 1)
            &&
            (typeof (tst23) == 2)
	    &&
	    (typeof (tst24) == 0)
	    &&
            (typeof (tst25) == 0)
            &&
	    (typeof (tst26) == 0)
	    &&
	    (typeof (tst27) == 3)
	    &&
	    (typeof (tst28) == 3)
	    &&
	    (typeof (tst29) == 3)
            &&
            (typeof (tst30) == 3)
            &&
            (typeof (tst31) == 3)
            &&
            (typeof (tst32) == 3)
	    &&
	    (typeof (tst33) == 3)
	    &&
 	    (typeof (tst34) == 3)
	    &&
 	    (typeof (tst35) == 3)
	    &&
 	    (typeof (tst36) == 3)
	    &&
 	    (typeof (tst37) == 3)
	    &&
 	    (typeof (tst38) == 3)
	    &&
	    (typeof (tst39) == 3)
            &&
	    (typeof (tst40) == 3)
            &&
	    (typeof (tst41) == 3)
            &&
	    (typeof (tst42) == 3)
            &&
	    (typeof (tst43) == 3)
            &&
	    (typeof (tst44) == 3)
            &&
	    (typeof (tst45) == 0)
	    &&
            (typeof (tst46) == 0)
            &&
            (typeof (tst47) == 0)
            &&
            (typeof (tst48) == 3)
            &&
            (typeof (tst49) == 3)
            &&
	    (typeof (tst50) == 0)
            &&
	    (typeof (tst51) == 0)
	    &&
            (typeof (tst52) == 1)
	    &&
	    (typeof (tst53) == 1)
	    &&
	    (typeof (tst54) == 1)
	    &&
	    (typeof (tst55) == 0)
	    &&
	    (typeof (tst56) == 0)
	    &&
	    (typeof (tst57) == 0)
	    &&
	    (typeof (tst58) == 1)
	    &&
            (typeof (tst59) == 2)
            &&
            (typeof (tst60) == 0)
            &&
            (typeof (tst61) == 0)
            &&
            (typeof (tst62) == 0)
            &&
            (typeof (tst63) == 0)
            &&
            (typeof (tst64) == 0)
            &&
            (typeof (tst65) == 0)
           )
        {

  	   result = 'pass';

	}

	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

