summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-06-21 13:13:26 +0200
committerJan Holesovsky <kendy@suse.cz>2013-06-21 13:14:06 +0200
commite2ba9b895b262dd16d452e8b461790beebb2dab3 (patch)
treeb942b582ee258b98af96036402da3d4a9fee55ef /sd
parent448fa131b2dafac305d88480e469cc4bc0515d68 (diff)
Better description of the sd unit tests creation.
Change-Id: I7d3ac7997f54f4cb3fc826601d89248ea42549f4
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bebda14dcfcf..c9dfd6052cf8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -48,10 +48,28 @@ public:
/** Test document against a reference XML dump of shapes.
-If you want to update one of these tests, set the nUpdateMe to the index of
-the test, the dump XML's will be created (or rewritten) instead of checking.
-Use with care - when the test is failing, first find out why, instead of just
-updating .xml's blindly.
+If you want to update one of these tests, or add a new one, set the nUpdateMe
+to the index of the test, and the dump XML's will be created (or rewritten)
+instead of checking. Use with care - when the test is failing, first find out
+why, instead of just updating .xml's blindly.
+
+Example: Let's say you are adding a test called fdoABCD.pptx. You'll place it
+to the data/ subdirectory, and will add an entry to aFilesToCompare below,
+like:
+
+ { "fdoABCD.pptx", "xml/fdoABCD_" },
+
+and will count the index in the aFilesToCompare structure (1st is 0, 2nd is 1,
+etc.) Temporarily you'll set nUpdateMe to this index (instead of -1), and run
+
+make sd
+
+This will generate the sd/qa/unit/data/xml/fdoABCD_*.xml for you. Now you
+will change nUpdateMe back to -1, and commit your fdoABCD.pptx test, the
+xml/fdoABCD_*.xml dumps, and the aFilesToCompare addition in one commit.
+
+As the last step, you will revert your fix and do 'make sd' again, to check
+that without your fix, the unit test breaks. Then clean up, and push :-)
NOTE: This approach is suitable only for tests of fixes that actually change
the layout - best to check by reverting your fix locally after having added