Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 93923 invoked from network); 25 Nov 2006 03:57:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Nov 2006 03:57:07 -0000 Received: (qmail 84718 invoked by uid 500); 25 Nov 2006 03:57:11 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 84680 invoked by uid 500); 25 Nov 2006 03:57:11 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 84671 invoked by uid 99); 25 Nov 2006 03:57:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 19:57:10 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mloenko@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 19:56:58 -0800 Received: by nf-out-0910.google.com with SMTP id a4so1501439nfc for ; Fri, 24 Nov 2006 19:56:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lEl/SYBWO/qQoZ3zmQ4KmxoxMeE34NPAk4HdjLTsjPpuYVVslflPYJD766xV2IXBYyxvPh4QKflus7491Jf+yM2D+GM+gMyAGqPIakwXIfV3u25+r1AAfo4ExtBBLVYrbyVxR77xE2ttj0rWT4QFM/Arc06RCV2Ckr+ykyOitwI= Received: by 10.78.128.15 with SMTP id a15mr11022706hud.1164426996833; Fri, 24 Nov 2006 19:56:36 -0800 (PST) Received: by 10.78.164.6 with HTTP; Fri, 24 Nov 2006 19:56:36 -0800 (PST) Message-ID: <906dd82e0611241956x144925e9q4da2ddf8d9e210a4@mail.gmail.com> Date: Sat, 25 Nov 2006 09:56:36 +0600 From: "Mikhail Loenko" To: dev@harmony.apache.org Subject: Re: [classlib][test] isHarmony method in the swing tests In-Reply-To: <2c9597b90611240708mc90e91dm110a7057e456a413@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8E389A5F2FEABA4CB1DEC35A25CB39CE78367A@mssmsx411> <2c9597b90611240708mc90e91dm110a7057e456a413@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 2006/11/24, Alexei Zakharov : > I agree that it is convenient but someone needs to waste his/her time > on it. IMHO making any test passing on RI at any conditions is a > rather strange effort unless you are going to sell your test suite to > Sun. Moreover, it will complicate the test logic. +1 Thanks, Mikhail > > Thanks, > > 2006/11/24, Ivanov, Alexey A : > > >-----Original Message----- > > >From: Alexei Zakharov [mailto:alexei.zakharov@gmail.com] > > >Sent: Friday, November 24, 2006 5:23 PM > > >To: dev@harmony.apache.org > > >Subject: Re: [classlib][test] isHarmony method in the swing tests > > > > > >> If Harmony implementation is more reasonable, it's ok to write a test > > >> which passes against Harmony while breaks RI. > > > > > >I also do not completely understand why we should force our tests to > > >pass on RI even if we have non-bug-diff JIRAs filed. There are a lot > > >of tests in our classlib repository that fail on RI. > > > > IMHO, it's just more convenient: all tests should pass both on Harmony > > and RI. > > > > Regards, > > Alexey. > > > > > > > >Thanks, > > > > > >2006/11/23, Andrew Zhang : > > >> On 11/23/06, Mikhail Loenko wrote: > > >> > > > >> > Why we expect different exceptions? I think this test > > >> > discovers incompatibility and should be just fixed to expect the > > same > > >> > exception > > >> > > >> > > >> Agree. If Harmony implementation is more reasonable, it's ok to write > > a > > >test > > >> which passes against Harmony while breaks RI. And actually there're > > so > > >many > > >> such tests existings in current code, and we mark it as "Non > > difference > > >bug > > >> from RI". So IMO, making test pass on both Harmony and RI makes no > > sense. > > >> > > >> > > >> Thanks, > > >> > Mikhail > > >> > > > >> > 2006/11/23, Ivanov, Alexey A : > > >> > > Yeah, I remember about TestNG. Yet I think it won't solve all the > > >cases > > >> > > where isHarmony used. > > >> > > > > >> > > For example, look at the tests in > > >> > > https://issues.apache.org/jira/browse/HARMONY-2198 > > >> > > The isHarmony() method is used in if-else context there which > > >> > > demonstrates the difference between Harmony and RI. And mostly it > > is > > >> > > if-else context that isHarmony() is used. > > >> > > > > >> > > Regards, > > >> > > -- > > >> > > Alexey A. Ivanov > > >> > > Intel Enterprise Solutions Software Division > > >> > > > > >> > > > > >> > > >-----Original Message----- > > >> > > >From: Mikhail Loenko [mailto:mloenko@gmail.com] > > >> > > >Sent: Thursday, November 23, 2006 2:39 PM > > >> > > >To: dev@harmony.apache.org > > >> > > >Subject: Re: [classlib][test] isHarmony method in the swing > > tests > > >> > > > > > >> > > >We are going to swith to TestNG. > > >> > > > > > >> > > >So we will be able to handle all that stuff there, won't we? > > >> > > > > > >> > > >Thanks, > > >> > > >Mikhail > > >> > > > > > >> > > >2006/11/23, Ivanov, Alexey A : > > >> > > >> 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:mloenko@gmail.com] > > >> > > >> >Sent: Thursday, November 23, 2006 10:22 AM > > >> > > >> >To: dev@harmony.apache.org > > >> > > >> >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; > > >> > > >> > } > > -- > Alexei Zakharov, > Intel Enterprise Solutions Software Division >