Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2008-03-07 19:26:53 +0000
committerOleg Besedin2008-03-07 19:26:53 +0000
commit04d4dbf298adbb30a6f7269cb747195ea2aa9495 (patch)
tree77001cdf881a0e8e772adb23bc3b7b6049df4d42 /bundles/org.eclipse.equinox.security.tests
parentbc07a9c3739e1830028ee3abce137ed2cb8a728a (diff)
downloadrt.equinox.bundles-04d4dbf298adbb30a6f7269cb747195ea2aa9495.tar.gz
rt.equinox.bundles-04d4dbf298adbb30a6f7269cb747195ea2aa9495.tar.xz
rt.equinox.bundles-04d4dbf298adbb30a6f7269cb747195ea2aa9495.zip
Bug 220818 Add graduated security bundles to the build
Diffstat (limited to 'bundles/org.eclipse.equinox.security.tests')
-rw-r--r--bundles/org.eclipse.equinox.security.tests/build.properties4
-rw-r--r--bundles/org.eclipse.equinox.security.tests/src/org/eclipse/equinox/internal/security/tests/storage/SecurePreferencesTest.java21
2 files changed, 21 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.security.tests/build.properties b/bundles/org.eclipse.equinox.security.tests/build.properties
index dc993f980..2b9d52b26 100644
--- a/bundles/org.eclipse.equinox.security.tests/build.properties
+++ b/bundles/org.eclipse.equinox.security.tests/build.properties
@@ -4,6 +4,8 @@ bin.includes = META-INF/,\
.,\
about.html,\
plugin.xml,\
- Plugin_Testing/
+ Plugin_Testing/,\
+ test.xml,\
+ SecurePrefsSample/
src.includes = about.html,\
src/
diff --git a/bundles/org.eclipse.equinox.security.tests/src/org/eclipse/equinox/internal/security/tests/storage/SecurePreferencesTest.java b/bundles/org.eclipse.equinox.security.tests/src/org/eclipse/equinox/internal/security/tests/storage/SecurePreferencesTest.java
index 0581ad67c..053ed67f0 100644
--- a/bundles/org.eclipse.equinox.security.tests/src/org/eclipse/equinox/internal/security/tests/storage/SecurePreferencesTest.java
+++ b/bundles/org.eclipse.equinox.security.tests/src/org/eclipse/equinox/internal/security/tests/storage/SecurePreferencesTest.java
@@ -115,9 +115,7 @@ abstract public class SecurePreferencesTest extends StorageAbstractTest {
String[] leafKeys = node3.keys();
assertNotNull(leafKeys);
assertEquals(leafKeys.length, 3);
- boolean order1 = secondKey.equals(leafKeys[0]) && key.equals(leafKeys[1]);
- boolean order2 = secondKey.equals(leafKeys[1]) && key.equals(leafKeys[0]);
- assertTrue(order1 || order2);
+ findAll(new String[] {clearTextKey, key, secondKey}, leafKeys);
}
/**
@@ -486,6 +484,23 @@ abstract public class SecurePreferencesTest extends StorageAbstractTest {
}
}
+ // assumes all entries are unique and array1 has no null elements
+ private void findAll(String[] array1, String[] array2) {
+ assertNotNull(array1);
+ assertNotNull(array2);
+ assertEquals(array1.length, array2.length);
+ for (int i = 0; i < array1.length; i++) {
+ boolean found = false;
+ for (int j = 0; j < array2.length; j++) {
+ if (array1[i].equals(array2[j])) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+ }
+
private void compareArrays(byte[] array1, byte[] array2) {
assertNotNull(array1);
assertNotNull(array2);

Back to the top