mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-2010
code coverage update for UCharacterDirection X-SVN-Rev: 9289
This commit is contained in:
parent
b82ae85b5e
commit
45556a1366
1 changed files with 72 additions and 0 deletions
|
@ -0,0 +1,72 @@
|
|||
package com.ibm.icu.dev.test.lang;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.lang.UCharacterDirection;
|
||||
|
||||
/**
|
||||
* Testing UCharacterDirection
|
||||
* @author Syn Wee Quek
|
||||
* @since July 22 2002
|
||||
*/
|
||||
public class UCharacterDirectionTest extends TestFmwk
|
||||
{
|
||||
// constructor -----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Private constructor to prevent initialisation
|
||||
*/
|
||||
public UCharacterDirectionTest()
|
||||
{
|
||||
}
|
||||
|
||||
// public methods --------------------------------------------------------
|
||||
|
||||
public static void main(String[] arg)
|
||||
{
|
||||
try
|
||||
{
|
||||
UCharacterDirectionTest test = new UCharacterDirectionTest();
|
||||
test.run(arg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the argument category
|
||||
* @param category to retrieve name
|
||||
* @return category name
|
||||
*/
|
||||
public void TestToString()
|
||||
{
|
||||
String name[] = {"Left-to-Right",
|
||||
"Right-to-Left",
|
||||
"European Number",
|
||||
"European Number Separator",
|
||||
"European Number Terminator",
|
||||
"Arabic Number",
|
||||
"Common Number Separator",
|
||||
"Paragraph Separator",
|
||||
"Segment Separator",
|
||||
"Whitespace",
|
||||
"Other Neutrals",
|
||||
"Left-to-Right Embedding",
|
||||
"Left-to-Right Override",
|
||||
"Right-to-Left Arabic",
|
||||
"Right-to-Left Embedding",
|
||||
"Right-to-Left Override",
|
||||
"Pop Directional Format",
|
||||
"Non-Spacing Mark",
|
||||
"Boundary Neutral",
|
||||
"Unassigned"};
|
||||
for (int i = UCharacterDirection.LEFT_TO_RIGHT;
|
||||
i < UCharacterDirection.CHAR_DIRECTION_COUNT; i ++) {
|
||||
if (!UCharacterDirection.toString(i).equals(name[i])) {
|
||||
errln("Error toString for direction " + i + " expected " +
|
||||
name[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue