/hg/rhino-tests: Updated four tests in BindingsClassTest for (Op...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Apr 30 00:57:53 PDT 2013
changeset e74a55b0a132 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=e74a55b0a132
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Apr 30 10:01:10 2013 +0200
Updated four tests in BindingsClassTest for (Open)JDK8 API:
getField, getDeclaredField, getFields and getDeclaredFields.
diffstat:
ChangeLog | 6 +++
src/org/RhinoTests/BindingsClassTest.java | 62 +++++++++++++++++++++++++++++--
2 files changed, 64 insertions(+), 4 deletions(-)
diffs (113 lines):
diff -r 1b9cfd28c6e2 -r e74a55b0a132 ChangeLog
--- a/ChangeLog Mon Apr 29 10:25:19 2013 +0200
+++ b/ChangeLog Tue Apr 30 10:01:10 2013 +0200
@@ -1,3 +1,9 @@
+2013-04-30 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/BindingsClassTest.java:
+ Updated four tests in BindingsClassTest for (Open)JDK8 API:
+ getField, getDeclaredField, getFields and getDeclaredFields.
+
2013-04-29 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/AbstractScriptEngineClassTest.java:
diff -r 1b9cfd28c6e2 -r e74a55b0a132 src/org/RhinoTests/BindingsClassTest.java
--- a/src/org/RhinoTests/BindingsClassTest.java Mon Apr 29 10:25:19 2013 +0200
+++ b/src/org/RhinoTests/BindingsClassTest.java Tue Apr 30 10:01:10 2013 +0200
@@ -440,9 +440,22 @@
};
final String[] fieldsThatShouldExist_jdk7 = {
};
+ final String[] fieldsThatShouldExist_jdk8 = {
+ };
// get the right array of field signatures
- final String[] fieldsThatShouldExist = getJavaVersion() < 7 ? fieldsThatShouldExist_jdk6 : fieldsThatShouldExist_jdk7;
+ String[] fieldsThatShouldExist = null;
+ switch (getJavaVersion()) {
+ case 6:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk6;
+ break;
+ case 7:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk7;
+ break;
+ case 8:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk8;
+ break;
+ }
// get all fields
Field[] fields = this.bindingsClass.getFields();
@@ -467,10 +480,23 @@
};
final String[] declaredFieldsThatShouldExist_jdk7 = {
};
+ final String[] declaredFieldsThatShouldExist_jdk8 = {
+ };
// get the right array of field signatures
// following fields should be declared
- final String[] declaredFieldsThatShouldExist = getJavaVersion() < 7 ? declaredFieldsThatShouldExist_jdk6 : declaredFieldsThatShouldExist_jdk7;
+ String[] declaredFieldsThatShouldExist = null;
+ switch (getJavaVersion()) {
+ case 6:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk6;
+ break;
+ case 7:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk7;
+ break;
+ case 8:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk8;
+ break;
+ }
// get all declared fields
Field[] declaredFields = this.bindingsClass.getDeclaredFields();
@@ -495,8 +521,21 @@
};
final String[] fieldsThatShouldExist_jdk7 = {
};
+ final String[] fieldsThatShouldExist_jdk8 = {
+ };
- final String[] fieldsThatShouldExist = getJavaVersion() < 7 ? fieldsThatShouldExist_jdk6 : fieldsThatShouldExist_jdk7;
+ String[] fieldsThatShouldExist = null;
+ switch (getJavaVersion()) {
+ case 6:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk6;
+ break;
+ case 7:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk7;
+ break;
+ case 8:
+ fieldsThatShouldExist = fieldsThatShouldExist_jdk8;
+ break;
+ }
// check if all required fields really exists
for (String fieldThatShouldExists : fieldsThatShouldExist) {
@@ -522,8 +561,23 @@
};
final String[] declaredFieldsThatShouldExist_jdk7 = {
};
+ final String[] declaredFieldsThatShouldExist_jdk8 = {
+ };
- final String[] declaredFieldsThatShouldExist = getJavaVersion() < 7 ? declaredFieldsThatShouldExist_jdk6 : declaredFieldsThatShouldExist_jdk7;
+ // get the right array of field signatures
+ // following fields should be declared
+ String[] declaredFieldsThatShouldExist = null;
+ switch (getJavaVersion()) {
+ case 6:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk6;
+ break;
+ case 7:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk7;
+ break;
+ case 8:
+ declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk8;
+ break;
+ }
// check if all required declared fields really exists
for (String declaredFieldThatShouldExists : declaredFieldsThatShouldExist) {
More information about the distro-pkg-dev
mailing list