From dev-return-40096-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Fri Jan 07 03:29:54 2011 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 15863 invoked from network); 7 Jan 2011 03:29:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jan 2011 03:29:54 -0000 Received: (qmail 30300 invoked by uid 500); 7 Jan 2011 03:29:53 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 29966 invoked by uid 500); 7 Jan 2011 03:29:50 -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 29947 invoked by uid 99); 7 Jan 2011 03:29:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jan 2011 03:29:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jessewilson@google.com designates 216.239.44.51 as permitted sender) Received: from [216.239.44.51] (HELO smtp-out.google.com) (216.239.44.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jan 2011 03:29:43 +0000 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p073TJtf015006 for ; Thu, 6 Jan 2011 19:29:19 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294370961; bh=xeD13XLGC1saeR3HERElGKXYguU=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=cpZtUv8zRvFBxEJQaEgqTxaWYD9FIkvebt7VRBWNUaX2gWs0knayKc9MbfOBo3IIJ 74P9DPZ2IdOrj6/wGAIug== Received: from gyh4 (gyh4.prod.google.com [10.243.50.196]) by kpbe16.cbf.corp.google.com with ESMTP id p073TIFS002898 for ; Thu, 6 Jan 2011 19:29:18 -0800 Received: by gyh4 with SMTP id 4so6806528gyh.9 for ; Thu, 06 Jan 2011 19:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=uvGemswxn8VAQsIogfrG6luXDazsWgve+4C7Vj+CimQ=; b=EjjxMBC7XDV2jb0i+npHSB71U5OriDmnUruV/5Tke5mWHu6nOPpFmBiyWPpE/pxzcD am0+cohKvySGs08vHnqQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:from:date:message-id:subject:to:content-type; b=h+vHQfnZmhUiu++Ej4UMVmIptf8m944majN5Vtdi62cC6OdFe+o1g63Qv5j68Sd0Ts kZJvZrN1ttNQXHLHjiJQ== Received: by 10.90.32.19 with SMTP id f19mr2777444agf.138.1294370957708; Thu, 06 Jan 2011 19:29:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.36.17 with HTTP; Thu, 6 Jan 2011 19:28:57 -0800 (PST) From: Jesse Wilson Date: Thu, 6 Jan 2011 19:28:57 -0800 Message-ID: Subject: FYI: I'm dividing up some test cases To: Harmony Dev Content-Type: multipart/alternative; boundary=0016364edeb2244fc304993939b8 X-System-Of-Record: true --0016364edeb2244fc304993939b8 Content-Type: text/plain; charset=UTF-8 Harmony folks, Here on Android, we've been running Harmony's test suite on our devices. The extensive test suite includes many large test methods that exercise many behaviors. For example, consider this test method from StringBuffer2Test.java: public void test_insertI$CII() { // Test for method java.lang.StringBuffer // java.lang.StringBuffer.insert(int, char [], int, int) char[] c = new char[]{'n', 'o', 't', ' '}; testBuffer.insert(8, c, 0, 4); assertEquals("This is not a test buffer", testBuffer.toString()); StringBuffer buf1 = new StringBuffer("abcd"); try { buf1.insert(-1, (char[]) null, 0, 0); fail("Should throw StringIndexOutOfBoundsException"); } catch (StringIndexOutOfBoundsException e) { //expected } try { testBuffer.insert(testBuffer.length() - 1, c, -1, 1); } catch (StringIndexOutOfBoundsException e) { //expected } } This tests that the behavior of insert() is consistent with the spec. But it also tests which exception is thrown when multiple arguments are incorrect. That behavior is not specified, but Harmony tests it to ensure that implementation behaviors are consistent with those in the RI. I'd like to split this into two test methods. We Androids want to pass every test for behavior that's specified. But we're not as concerned with implementation details like exception priority. Splitting it into two tests makes it possible for us to manage the most important tests. For another example, InetAddressTest.test_getAllByNameLjava_lang_String() covers null handling, security managers, and IPv4 vs. IPv6 addresses. For this test I'd like to move the SecurityManager testing to a separate method. I'm planning on starting into this work beginning on Monday the 9th. If you'd rather I didn't, please let me know! Cheers, Jesse from Android --0016364edeb2244fc304993939b8--