Mikhail, Here it's not a temporary solution.
javax.swing.text.PlainViewI18N is for bidirectional text support. It is a package-private class, and it's not present in public API spec. Sun doesn't reveal its implementation of bidirectional text. I guess it's fully implemented yet: there are problems with it. What I can remember at once is you can't go through all the text using right or left arrows on keyboard because the caret jumps back. In general this method is used to differentiate our implementation from Sun. These differences are intentional. To make the tests pass both on RI and Harmony, it is checked which classlib is used. Also looking at the tests one sees the expected difference. Regards, Alexey. P.S. We can get rid of using this method and sort out the tests to separate implementation specific tests, but it requires lots of effort. On the other hand, some tests will lose the information about the difference. Subsequent releases of Java may change the behavior and we'll see it because of failing tests. This way we can adjust our implementation to the new RI impl. -- Alexey A. Ivanov Intel Enterprise Solutions Software Division >-----Original Message----- >From: Mikhail Loenko [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 23, 2006 10:22 AM >To: [email protected] >Subject: [classlib][test] isHarmony method in the swing tests > >Did I understand correctly that it's a temporary solution to >differentiate between >"api" and "impl" tests? > >package javax.swing.text; ><...> >public class PlainViewI18N_LineViewTest extends SwingTestCase { ><...> > public void testGetPreferredSpan01() throws Exception { > if (!isHarmony()) { > return; > }
