diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-04 15:06:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-04 15:07:11 +0100 |
commit | 8d74243a65da4b0e28a68018657e9b1375ae14d4 (patch) | |
tree | 004bbdfb41db84c8865a5f813738ec31971d3385 /qadevOOo | |
parent | 13086125abf5cbf142596be53729342263498613 (diff) |
Improve test code
Change-Id: I196a7f654bf8f061a4b050ea1fbe01fae9f450c2
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java index 7ec0c584a8cc..bfcee4da18f1 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java @@ -206,24 +206,21 @@ public class _XAccessibleContext extends MultiMethodTest { XAccessibleContext parentAC = parent.getAccessibleContext(); try { - if (parentAC.getAccessibleChild(idx) == null) { + XAccessible child = parentAC.getAccessibleChild(idx); + XAccessibleContext childAC = null; + if (child == null) { log.println("Parent has no child with this index"); bOK &= false; } else { - bOK &= AccessibilityTools.equals(parentAC.getAccessibleChild( - idx) - .getAccessibleContext(), - oObj); + childAC = child.getAccessibleContext(); + bOK &= AccessibilityTools.equals(childAC, oObj); } if (!bOK) { log.println("Expected: " + util.utils.getImplName(oObj)); - if (parentAC.getAccessibleChild(idx) != null) { - log.println("Getting: " + - util.utils.getImplName( - parentAC.getAccessibleChild(idx) - .getAccessibleContext())); + if (childAC != null) { + log.println("Getting: " + util.utils.getImplName(childAC)); } } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { |