Skip to content

Commit d9150c6

Browse files
committed
update unit tests
1 parent 0b5f1c3 commit d9150c6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/com/danga/MemCached/test/UnitTests.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,19 @@ public static void test17() {
146146
assert b.booleanValue();
147147
}
148148

149+
public static void test18() {
150+
long i = 0;
151+
mc.addOrIncr( "foo" ); // foo now == 0
152+
mc.incr( "foo" ); // foo now == 1
153+
mc.incr( "foo", (long)5 ); // foo now == 6
154+
155+
mc.addOrIncr( "foo" ); // foo now 7
156+
157+
long j = mc.decr( "foo", (long)3 ); // foo now == 4
158+
assert j == 4;
159+
assert j == mc.getCounter( "foo" );
160+
}
161+
149162
/**
150163
* This runs through some simple tests of the MemCacheClient.
151164
*

0 commit comments

Comments
 (0)