Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360835

Summary: Unexpected results for charCodeAt
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: greer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-10-13 10:20:44 EDT
Is this even legal for JavaScript?  It is restricted in RBD. 

Use the EUNIT framework to test these variations

library tester

	s1 string;
	nS1 string?;
	actualInt int;
	expectedInt int;
	actualStr string;
	expectedStr string;
	
		
	function runCharacterUtilFunction21(){@Test}
		s1 = "abcdef ";
		actualInt = s1.charCodeAt(2);
		expectedInt = 98;
		LogResult.assertBigIntEqual1(expectedInt, actualInt);
	end
	
	function runCharacterUtilFunction22(){@Test}
		s1 = "12345";
		actualInt = s1.charCodeAt(2);
		expectedInt = 50;
		LogResult.assertBigIntEqual1(expectedInt, actualInt);
	end

end
Comment 1 Scott Greer CLA 2011-10-14 10:51:22 EDT
Fixed;  according to Matt, this should be supported for JavaScript in EDT.
Comment 2 Kathy Carroll CLA 2011-10-17 18:25:02 EDT
Verified 20111010901 & closed