mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
test: don't need commutativity parameter here after all
This commit is contained in:
parent
eab4c4ba8e
commit
d849b6d8a8
@ -319,21 +319,11 @@ public class UncachedKeyringMergeTest {
|
|||||||
|
|
||||||
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b)
|
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return mergeWithChecks(a, b, a, true);
|
return mergeWithChecks(a, b, a);
|
||||||
}
|
|
||||||
|
|
||||||
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b, boolean commutative)
|
|
||||||
throws Exception {
|
|
||||||
return mergeWithChecks(a, b, a, commutative);
|
|
||||||
}
|
|
||||||
|
|
||||||
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b, UncachedKeyRing base)
|
|
||||||
throws Exception {
|
|
||||||
return mergeWithChecks(a, b, base, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b,
|
private UncachedKeyRing mergeWithChecks(UncachedKeyRing a, UncachedKeyRing b,
|
||||||
UncachedKeyRing base, boolean commutative)
|
UncachedKeyRing base)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
Assert.assertTrue("merging keyring must be secret type", a.isSecret());
|
Assert.assertTrue("merging keyring must be secret type", a.isSecret());
|
||||||
@ -350,13 +340,11 @@ public class UncachedKeyringMergeTest {
|
|||||||
Assert.assertNotNull("merge must succeed as sec(b)+sec(a)", resultB);
|
Assert.assertNotNull("merge must succeed as sec(b)+sec(a)", resultB);
|
||||||
|
|
||||||
// check commutativity, if requested
|
// check commutativity, if requested
|
||||||
if (commutative) {
|
|
||||||
Assert.assertFalse("result of merge must be commutative",
|
Assert.assertFalse("result of merge must be commutative",
|
||||||
KeyringTestingHelper.diffKeyrings(
|
KeyringTestingHelper.diffKeyrings(
|
||||||
resultA.getEncoded(), resultB.getEncoded(), onlyA, onlyB)
|
resultA.getEncoded(), resultB.getEncoded(), onlyA, onlyB)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
final UncachedKeyRing pubA = a.extractPublicKeyRing();
|
final UncachedKeyRing pubA = a.extractPublicKeyRing();
|
||||||
final UncachedKeyRing pubB = b.extractPublicKeyRing();
|
final UncachedKeyRing pubB = b.extractPublicKeyRing();
|
||||||
|
Loading…
Reference in New Issue
Block a user