| 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 | | |
|---|
| | 149 | diag "Test increment"; |
|---|
| | 150 | $mc->flush; |
|---|
| | 151 | is($mc->incr("x"), 0, "First incr call is zero"); |
|---|
| | 152 | is($mc->incr("x"), 1, "Second incr call is one"); |
|---|
| | 153 | is($mc->incr("x", 211), 212, "Adding 211 gives you 212"); |
|---|
| | 154 | is($mc->incr("x", 2**33), 8589934804, "Blast the 32bit border"); |
|---|
| | 155 | |
|---|
| | 156 | diag "Test decrement"; |
|---|
| | 157 | $mc->flush; |
|---|
| | 158 | is($mc->incr("x", undef, 5), 5, "Initial value"); |
|---|
| | 159 | is($mc->decr("x"), 4, "Decrease by one"); |
|---|
| | 160 | is($mc->decr("x", 211), 0, "Floor is zero"); |
|---|
| | 161 | |
|---|