Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360835 - Unexpected results for charCodeAt
Summary: Unexpected results for charCodeAt
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 10:20 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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