Code example for Adler32

Methods: getValue, update

0
        assertEquals(
                "update(max) failed to update the checksum to the correct value ", 
                16777472L, adl.getValue());
 
        adl.reset();
        adl.update(Integer.MIN_VALUE);
        // System.out.print("value of adl " + adl.getValue()); 
        // 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#update(byte[]) 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "update", 
        args = {byte[].class} 
    ) 
    public void test_update$B() { 
        // test method of java.util.zip.update(byte[]) 
        byte byteArray[] = {1, 2};
        Adler32 adl = new Adler32();
        adl.update(byteArray);
        // System.out.print("value of adl"+adl.getValue()); 
        // The value of the adl should be 393220 
        assertEquals(
                "update(byte[]) failed to update the checksum to the correct value ",