public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* Additional Bidi tests.
@ 2006-06-09 18:58 Sven de Marothy
  0 siblings, 0 replies; only message in thread
From: Sven de Marothy @ 2006-06-09 18:58 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 39 bytes --]

Found a bidi bug, here's a test.
/Sven

[-- Attachment #2: bidi.patch --]
[-- Type: text/x-patch, Size: 1097 bytes --]

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]);
+		      }
+		  }
 	}
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-09 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 18:58 Additional Bidi tests Sven de Marothy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).