diff options
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java index 06cb11b37a..7e11a61035 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, Google Inc. + * Copyright (C) 2008, 2015 Google Inc. * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -61,6 +61,17 @@ public class NBTest { } @Test + public void testCompareUInt64() { + assertTrue(NB.compareUInt64(0, 0) == 0); + assertTrue(NB.compareUInt64(1, 0) > 0); + assertTrue(NB.compareUInt64(0, 1) < 0); + assertTrue(NB.compareUInt64(-1, 0) > 0); + assertTrue(NB.compareUInt64(0, -1) < 0); + assertTrue(NB.compareUInt64(-1, 1) > 0); + assertTrue(NB.compareUInt64(1, -1) < 0); + } + + @Test public void testDecodeUInt16() { assertEquals(0, NB.decodeUInt16(b(0, 0), 0)); assertEquals(0, NB.decodeUInt16(padb(3, 0, 0), 3)); |