From fb970d92bc737afe34e23a0667b1737c6b105fde Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 2 Aug 2015 02:09:48 +0200 Subject: Fix Bitfield.put(..): Return previous value --- src/junit/com/jogamp/common/util/TestBitfield00.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/junit/com') diff --git a/src/junit/com/jogamp/common/util/TestBitfield00.java b/src/junit/com/jogamp/common/util/TestBitfield00.java index a2d5d73..bb8ca37 100644 --- a/src/junit/com/jogamp/common/util/TestBitfield00.java +++ b/src/junit/com/jogamp/common/util/TestBitfield00.java @@ -320,12 +320,16 @@ public class TestBitfield00 extends SingletonJunitCase { assertEquals(bf, lowBitnum+1, d.val, d.pattern, oneBitCount); } + // test put() return value (previous value) + bf.clearField(false); + Assert.assertEquals(msg+", bitpos "+0, false, bf.put(lowBitnum+0, true)); + Assert.assertEquals(msg+", bitpos "+0, true, bf.put(lowBitnum+0, false)); + // // via put // - bf.clearField(false); for(int i=0; i