This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Additional Bidi tests.


Found a bidi bug, here's a test.
/Sven
Index: gnu/testlet/java/text/Bidi/Basic.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/Bidi/Basic.java,v
retrieving revision 1.1
diff -U3 -r1.1 Basic.java
--- gnu/testlet/java/text/Bidi/Basic.java	21 Mar 2006 19:59:15 -0000	1.1
+++ gnu/testlet/java/text/Bidi/Basic.java	9 Jun 2006 18:52:05 -0000
@@ -64,5 +64,20 @@
 		b = new Bidi("car \u202eMEANS CAR\u202c.",
 					Bidi.DIRECTION_RIGHT_TO_LEFT);
 		testOne(harness, b, "2221333333333311");
+
+		b = new Bidi( new String( new char[]{ 'A', '2', '3', (char)0x05e2, ' ', (char)0x05d1, 'C', (char)0x05e8, 'D', (char)0x05d9, (char)0x05ea } ), 
+			      Bidi.DIRECTION_LEFT_TO_RIGHT );
+		harness.check(b.getRunCount(), 6);
+		if( b.getRunCount() == 6 )
+		  {
+		    int levels[] = new int[]{0,1,0,1,0,1};
+		    int limits[] = new int[]{0,3,6,7,8,9,11};
+		    for(int i = 0; i < 6; i++)
+		      {
+			harness.check(b.getRunLevel(i), levels[i]);
+			harness.check(b.getRunStart( i ), limits[i]);
+			harness.check(b.getRunLimit( i ), limits[i+1]);
+		      }
+		  }
 	}
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]