Show
Ignore:
Timestamp:
03/27/08 04:31:35 (20 months ago)
Author:
dormando
Message:

Fix incr/decr perl tests. Next up is CAS, which are no longer separate commands.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/binary/server/t/binary.t

    r765 r767  
    366366        my $init_lo = int($init % 2 ** 32); 
    367367 
    368         return $self->_doCmd($cmd, $key, '', pack(::INCRDECR_PKT_FMT, $amt_hi, $amt_lo, $init_hi, $init_lo, $exp)); 
     368        my $data = $self->_doCmd($cmd, $key, '', pack(::INCRDECR_PKT_FMT, $amt_hi, $amt_lo, $init_hi, $init_lo, $exp)); 
     369        my $header = substr $data, 0, 12, ''; 
     370        my ($resp_hi, $resp_lo) = unpack "NN", $header; 
     371        my $resp = ($resp_hi * 2 ** 32) + $resp_lo; 
     372    return $resp; 
    369373} 
    370374 
     
    386390        $exp = 0 unless defined $exp; 
    387391 
    388         return $self->__incrdecr(::CMD_INCR, $key, 0 - $amt, $init, $exp); 
     392        return $self->__incrdecr(::CMD_DECR, $key, $amt, $init, $exp); 
    389393} 
    390394