Changeset 682

Show
Ignore:
Timestamp:
12/13/07 09:26:50 (1 year ago)
Author:
hachi
Message:

Add decrement test, which is currently failing. This is due to a problem in the test, not a problem in the memcached.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/binary/server/t/binary.t

    r681 r682  
    9595$empty->('y'); 
    9696 
    97 diag "Test increment"; 
    98 $mc->flush; 
    99 is($mc->incr("x"), 0, "First incr call is zero"); 
    100 is($mc->incr("x"), 1, "Second incr call is one"); 
    101 is($mc->incr("x", 211), 212, "Adding 211 gives you 212"); 
    102 is($mc->incr("x", 2**33), 8589934804, "Blast the 32bit border"); 
    103  
    10497{ 
    10598        diag "Reservation delete"; 
     
    154147} 
    155148 
     149diag "Test increment"; 
     150$mc->flush; 
     151is($mc->incr("x"), 0, "First incr call is zero"); 
     152is($mc->incr("x"), 1, "Second incr call is one"); 
     153is($mc->incr("x", 211), 212, "Adding 211 gives you 212"); 
     154is($mc->incr("x", 2**33), 8589934804, "Blast the 32bit border"); 
     155 
     156diag "Test decrement"; 
     157$mc->flush; 
     158is($mc->incr("x", undef, 5), 5, "Initial value"); 
     159is($mc->decr("x"), 4, "Decrease by one"); 
     160is($mc->decr("x", 211), 0, "Floor is zero"); 
     161 
    156162<<EOT; 
    157163    def testIncrDoesntExistNoCreate(self):