summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2011-02-01 11:12:15 +0100
committerVladimir Glazunov <vg@openoffice.org>2011-02-01 11:12:15 +0100
commit06601d33f1b67b228b4dc3945ce0a52191effbbe (patch)
treea350a6234e8672c7be62eba80e1fc0c9319a0382 /qadevOOo
parentfd74891f5fd19ae640448c459026fdde22daccfa (diff)
parentdd9c079376466abb47cbe04b7c3204bb592f0314 (diff)
CWS-TOOLING: integrate CWS dba34b
Notes
split repo tag: testing_ooo/DEV300_m99
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/complexlib/Assurance.java25
1 files changed, 23 insertions, 2 deletions
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java
index 665980d792ab..980ede95f052 100644
--- a/qadevOOo/runner/complexlib/Assurance.java
+++ b/qadevOOo/runner/complexlib/Assurance.java
@@ -75,7 +75,7 @@ public class Assurance
* @param actual specifies the actual boolean value
*/
protected void assureEquals( boolean expected, boolean actual ) {
- assureEquals( "Equality test failed", new Boolean( expected ), new Boolean( actual ), false );
+ assureEquals( "Equality test failed", expected, new Boolean( actual ), false );
}
/**
@@ -85,7 +85,7 @@ public class Assurance
* @param actual specifies the actual boolean value
*/
protected void assureEquals( String message, boolean expected, boolean actual ) {
- assureEquals( message, new Boolean( expected ), new Boolean( actual ), false );
+ assureEquals( message, expected, actual, false );
}
/**
@@ -240,6 +240,27 @@ public class Assurance
assureEquals( message, expected, actual, false );
}
+ /**
+ * assures the two given sequences are of equal length, and have equal content
+ */
+ public <T> void assureEquals( String i_message, T[] i_expected, T[] i_actual, boolean i_continue )
+ {
+ if ( i_expected.length != i_actual.length )
+ failed( i_message + ": expected element count: " + i_expected.length + ", actual element count: " + i_actual.length );
+ for ( int i=0; i<i_expected.length; ++i )
+ {
+ assureEquals( i_message + ": mismatch at element pos " + i, i_expected[i], i_actual[i], i_continue );
+ }
+ }
+
+ /**
+ * assures the two given sequences are of equal length, and have equal content
+ */
+ public <T> void assureEquals( String i_message, T[] i_expected, T[] i_actual )
+ {
+ assureEquals( i_message, i_expected, i_actual, false );
+ }
+
/** invokes a given method on a given object, and assures a certain exception is caught
* @param _message is the message to print when the check fails
* @param _object is the object to invoke the method on