Code example for Adler32

Methods: getValue, reset, update

0
        // The value of the adl should be 65537 
        assertEquals(
                "update(min) failed to update the checksum to the correct value ", 
                65537L, adl.getValue());
    } 
 
    /** 
     * @tests java.util.zip.Adler32#reset() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "reset", 
        args = {} 
    ) 
    public void test_reset() { 
        // test methods of java.util.zip.reset() 
        Adler32 adl = new Adler32();
        adl.update(1);
        // System.out.print("value of adl"+adl.getValue()); 
        // The value of the adl should be 131074 
        assertEquals(
                "update(int) failed to update the checksum to the correct value ", 
                131074, adl.getValue());
        adl.reset();
        assertEquals("reset failed to reset the checksum value to zero", 1, adl
                .getValue());
    }