<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscript/type/operator/4" class="A" scope="wmlscript" testtype="application" type="auto" source="wmls11#6.9" device="both">
  <assertion>When a unary operator expects operands of either Integer or Floating Point, if the operand is of type Integer or Floating Point or can be converted to a Integer or Floating Point value, then the operation is performed on the Integer or Floating Point values and its result is returned.
</assertion>
  <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';

	if (typeof(+10) == 0 &&
		typeof(-"33") == 0 &&
		typeof(+true) == 0 &&
		typeof(-false) == 0 &&
		typeof(-"ABC") == 4 )
	{
		result = 'pass';
		if (Lang.float())
		{
			result = 'fail';	
			if (typeof(-10.3) == 1 &&
				typeof(+"47.3") == 1 &&
				typeof(-"9e9999") == 4)
			{
				result = 'pass';
			}
		}
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

