* FYI: SinglePixelPackedSampleModel - extended test
@ 2006-07-13 16:04 David Gilbert
0 siblings, 0 replies; only message in thread
From: David Gilbert @ 2006-07-13 16:04 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
This patch (committed) extends a test for the
SinglePixelPackedSampleModel class, to cover a bug that I just fixed in
GNU Classpath CVS:
2006-07-13 David Gilbert <david.gilbert@object-refinery.com>
*
gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java
(test): Moved existing test code to test1(), now calls test1() and
test2();
(test1): New method,
(test2): New method.
Regards,
Dave
[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 2135 bytes --]
Index: gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java,v
retrieving revision 1.2
diff -u -r1.2 getSampleSize.java
--- gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java 3 Jun 2004 14:31:05 -0000 1.2
+++ gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java 13 Jul 2006 15:54:19 -0000
@@ -1,6 +1,7 @@
// Tags: JDK1.2
// Copyright (C) 2004 Sascha Brawer <brawer@dandelis.ch>
+// Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
// This file is part of Mauve.
@@ -15,9 +16,9 @@
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
-// along with Mauve; see the file COPYING. If not, write to
-// the Free Software Foundation, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
+// along with Mauve; see the file COPYING. If not, write to the
+// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301 USA.
package gnu.testlet.java.awt.image.SinglePixelPackedSampleModel;
@@ -36,10 +37,16 @@
public class getSampleSize
implements Testlet
{
+
public void test(TestHarness harness)
{
+ test1(harness);
+ test2(harness);
+ }
+
+ public void test1(TestHarness harness)
+ {
SinglePixelPackedSampleModel sm;
- DataBuffer dbuf;
int[] bitMasks;
bitMasks = new int[] { 0xf0, 0x08, 0x6, 0x1 };
@@ -97,4 +104,17 @@
// Check #11
harness.check(sizes[3], 1);
}
+
+ public void test2(TestHarness harness)
+ {
+ SinglePixelPackedSampleModel m = new SinglePixelPackedSampleModel(
+ DataBuffer.TYPE_INT, 10, 20, new int[] {0xFF, 0xFF00, 0xFF0000,
+ 0xFF000000});
+ int[] sizes = m.getSampleSize();
+ harness.check(sizes.length, 4);
+ harness.check(sizes[0], 8);
+ harness.check(sizes[1], 8);
+ harness.check(sizes[2], 8);
+ harness.check(sizes[3], 8);
+ }
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-13 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-13 16:04 FYI: SinglePixelPackedSampleModel - extended test David Gilbert
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).