<?xml version="1.0"?>
<mx:Application name="lightspark_valueof_test"
	xmlns:mx="http://www.adobe.com/2006/mxml"
	layout="absolute"
	applicationComplete="appComplete();"
	backgroundColor="white">

<mx:Script>
	<![CDATA[
	import Tests;
	import ValueOfTestCase;
	import ValueOfTestCase2;
	private function appComplete():void
	{
		var test:ValueOfTestCase = new ValueOfTestCase();
		var test2:ValueOfTestCase2 = new ValueOfTestCase2();
		Tests.assertEquals(String(test),"[object ValueOfTestCase]","String(test)",true);
		Tests.assertEquals(Number(test),4.2,"Number(test)",true);
		Tests.assertEquals(uint(test),4,"uint(test)",true);
		Tests.assertEquals(int(test),4,"int(test)",true);
		Tests.assertEquals(Boolean(test),true,"Boolean(test)",true);
		Tests.assertTrue(test > 4.1,"test > 4.1");
		Tests.assertTrue(test < 4.3,"test < 4.3");
		Tests.assertTrue(test !== 4.2,"test !== 4.2");
		Tests.assertTrue((test + 1) == 5.2,"test + 1 == 5.2");

		Tests.assertTrue(test == 4.2,"test == 4.2");
		Tests.assertTrue(test2 == "4.2","test2 == \"4.2\"");
		Tests.assertTrue(test == "4.2","test == \"4.2\"");
		Tests.assertTrue(test2 == 4.2,"test2 == 4.2");
		Tests.assertTrue(4.2 == "4.2","4.2 == \"4.2\"");
		//Even though test.valueOf() == test2.valueOf(), this does not give
		//equality of test == test2.
		Tests.assertTrue(test != test2,"test != test2");
		Tests.report(visual, this.name);
	}
	]]>
</mx:Script>

<mx:UIComponent id="visual" />

</mx:Application>
