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

Bug 342926

Summary: [JUnit] DBCS4.1: JUnit4 can not generate a method name with CJK extension B.
Product: [Eclipse Project] JDT Reporter: Masaihko Maedera <maedera>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r, pwebster
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Masaihko Maedera CLA 2011-04-15 03:53:09 EDT
Build Identifier: I20110407-2200

OS: SLES11
Eclipse: 4.1 I20110407-2200
JDK: IBM 1.6.0

When I create a methods name such as cjkExtensionB\ud842\udf9f() by JUnit4,
JUnit generates testCjkExtensionB() instead of cjkExtensionB\ud842\udf9f().

Reproducible: Always

Steps to Reproduce:
1. Paste the following code in your Java Editor and create the class BugXXXXXX.
--------------------------------
public class BugXXXXXX {
	public void cjk\u4e00() {
		
	}
	public void cjkExtensionB\ud842\udf9f() {
		
	}
}
----------------------------------
2. From the context menu of BugXXXXXX.java -> [New] -> [JUnit Test Case...]
3. Type BugXXXXXXTest for 'Name' field and select BugXXXXXX for 'Class under test', then click [Next:.
4. Select 'cjk\u4e00()' and 'cjkExtensionB\ud842\udf9f()', then click [Finish].
5. JUnit4 can generate testCJK\u4e00(), but it can not generate testCjkExtensionB\ud842\udf9f().
6. It generates testCjkExtensionB() and truncates the name after '\ud842'.
Comment 1 Dani Megert CLA 2011-04-15 06:03:47 EDT
Created attachment 193341 [details]
Fix
Comment 2 Dani Megert CLA 2011-04-15 06:04:22 EDT
Fixed in HEAD.
Available in builds >= N20110415-2000.
Comment 3 Masaihko Maedera CLA 2011-05-12 05:02:40 EDT
I verified this bug has been fixed under I20110501-0200 (Eclipse SDK 4.1 M7).
Thank you.