[Libreoffice-commits] core.git: sw/qa
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 5 08:45:54 UTC 2020
sw/qa/core/uwriter.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit ed3ccdbde9ace7d2e3d67a9cc83a189cfaf1cad9
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Aug 4 21:05:54 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Aug 5 10:45:08 2020 +0200
CppunitTest_sw_uwriter: make rng used in this test repeatable
So in case the test fails, it's possible to see the same failure
multiple times.
Change-Id: Ic573807967b004bb7650ffb3614f5006db34080e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100137
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 079f7e311245..a2b5e99e079b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -43,6 +43,7 @@
#include <sfx2/docfile.hxx>
#include <xmloff/odffields.hxx>
+#include <osl/process.h>
#include <breakit.hxx>
#include <doc.hxx>
@@ -1075,6 +1076,10 @@ getRandomPosition(SwDoc *pDoc, int /* nOffset */)
void SwDocTest::randomTest()
{
+ OUString aEnvKey("SAL_RAND_REPEATABLE");
+ OUString aEnvValue("1");
+ osl_setEnvironment(aEnvKey.pData, aEnvValue.pData);
+
CPPUNIT_ASSERT_MESSAGE("SwDoc::IsRedlineOn()", !m_pDoc->getIDocumentRedlineAccess().IsRedlineOn());
RedlineFlags modes[] = {
RedlineFlags::On,
More information about the Libreoffice-commits
mailing list