summaryrefslogtreecommitdiff
path: root/sw/qa/extras/README
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-16 11:27:33 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-16 11:29:35 +0200
commit033f59dad003333d449fec8b8eccf8674ee59d8e (patch)
tree79845a4459b0487327dcd4b0d79c799b26a7abc5 /sw/qa/extras/README
parentb2bc4ea8ddae6b01f344469d988e21fed3143c42 (diff)
sw/qa/extras/README: document how to run a single test
This was already documented in the code, but first it got copy&pasted several times, then now it's "hidden" in a header, so not so easy to find. Change-Id: I6c6814a14bb6208d9f31ee66f0c0f9b843ee7157
Diffstat (limited to 'sw/qa/extras/README')
-rw-r--r--sw/qa/extras/README19
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/README b/sw/qa/extras/README
index fbc6aac5355d..1959f68d8c8e 100644
--- a/sw/qa/extras/README
+++ b/sw/qa/extras/README
@@ -128,6 +128,25 @@ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DE
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
----
+== CppUnit tips
+
+=== sal_Bool
+
+In case an UNO method returns sal_Bool, and the assert fails, CppUnit won't be
+able to print a usable error message, as it will think that the value is a
+printable character. Best to use `bool` for the expected value and cast the
+actual value to `bool` as well before comparing.
+
+=== Running only a single test
+
+If you want to run only a single test to allow quick development iteration,
+then you need to do two things:
+
+- change the `#if 1` in `inc/swmodeltestbase.hxx` to `#if 0` to define the test
+ macro with the `_ONLY` suffix
+- change the used macro for the test you want to run, i.e.
+ `DECLARE_OOXMLEXPORT_TEST` -> `DECLARE_OOXMLEXPORT_TEST_ONLY`
+
== UNO, in more details, various tips:
=== writing code based xray inspection: