<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/string/tostring/1" class="A" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#9.15" device="both">
  <assertion>When the String.toString function is called with a parameter
Value, the function returns a string representing Value as defined in the
WMLScript specification for type conversion.
</assertion>
  <notes>Can't use floating point as string representation is implementation dependent</notes>
  <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 (String.toString(103) == "103" &&
		String.toString(-20) == "-20" &&
		String.toString(true) == "true" &&
		String.toString(false) == "false") {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

