summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-12 07:46:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-12 07:47:36 +0100
commitcff72ec4bf87c6484be97d954966309ba7a5eb8a (patch)
tree8ea9318ab6991ec36b48f5bc8cc4e78d96e8b81c /qadevOOo
parentb0db93d00e1dd208baa96eb3e10df12950cdcb49 (diff)
Minor qadevOOo improvement
Change-Id: Ibeefc8e9aad57c28722b62610231d14ebc8a7403
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/lib/MultiMethodTest.java46
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java2
2 files changed, 15 insertions, 33 deletions
diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java
index dd467af2c8b0..b28194b7f0b5 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -180,7 +180,6 @@ public class MultiMethodTest
}
System.out.println(" is iface: [" + testedClassName + "] testcode: [" + entry.entryName + "]");
- tEnv.getTestObject();
Object oObj = UnoRuntime.queryInterface(testedClass, tEnv.getTestObject());
if (oObj == null)
@@ -200,7 +199,16 @@ public class MultiMethodTest
}
//setting the field oObj
- setField("oObj", oObj);
+ try
+ {
+ setField("oObj", oObj);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ setSubStates(e.toString());
+ return tRes;
+ }
}
// to perform some stuff before all method tests
@@ -464,37 +472,9 @@ public class MultiMethodTest
return clName.substring(clName.lastIndexOf('.') + 1);
}
- /**
- * Initializes <code>fieldName</code> of the subclass with
- * <code>value</code>.
- *
- * @return Status describing the result of the operation.
- */
- protected Status setField(String fieldName, Object value)
+ private void setField(String fieldName, Object value)
+ throws NoSuchFieldException, IllegalAccessException
{
- Field objField;
-
- try
- {
- objField = this.getClass().getField(fieldName);
- }
- catch (NoSuchFieldException nsfE)
- {
- return Status.exception(nsfE);
- }
-
- try
- {
- objField.set(this, value);
- return Status.passed(true);
- }
- catch (IllegalArgumentException iaE)
- {
- return Status.exception(iaE);
- }
- catch (IllegalAccessException iaE)
- {
- return Status.exception(iaE);
- }
+ this.getClass().getField(fieldName).set(this, value);
}
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
index d7c513c99088..ff8296aeefd3 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
@@ -62,6 +62,8 @@ public class _XDataPilotTable2 extends MultiMethodTest
private ArrayList<Integer> mDataFieldDims = null;
private ArrayList<CellAddress> mResultCells = null;
+ public XDataPilotTable2 oObj;
+
/**
* exception to be thrown when obtaining a result data for a cell fails
* (probably because the cell is not a result cell).