[Libreoffice-commits] online.git: loolwsd/README

Henry Castro hcastro at collabora.com
Mon Jul 4 19:41:20 UTC 2016


 loolwsd/README |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

New commits:
commit c7a655b54d1af2093c85edaa9193b981b6719cfa
Author: Henry Castro <hcastro at collabora.com>
Date:   Mon Jul 4 15:38:21 2016 -0400

    loolwsd: doc: running unit tests

diff --git a/loolwsd/README b/loolwsd/README
index a58b948..5f68234 100644
--- a/loolwsd/README
+++ b/loolwsd/README
@@ -204,6 +204,30 @@ Use the ps command to find out exactly the path to use.
 
 Set LOOL_DEBUG=1 to trap SIGSEGV and SEGBUS and prompt for debugger.
 
+In order to run and debug one unit test:
+TODO. Improve like LO Core (i.e. make -sr CppunitTest_svtools_graphic CPPUNIT_TEST_NAME="GraphicObjectTest::testPdf")
+
+	Example to run httpgettest.cpp unit test
+
+	// file test.cpp
+	// uncomment line codes
+	CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry("httpwstest");
+	runner.addTest(registry.makeTest());
+
+	// file test.cpp
+	// disable line code to avoid running all unit tests
+	// auto all = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
+	// runner.addTest(all);
+
+	// file httpwstest.cpp
+	// it requires a Named Registration, add following line code
+	CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(HTTPWSTest, "httpwstest");
+	// disable default registration
+	// CPPUNIT_TEST_SUITE_REGISTRATION(HTTPWSTest);
+
+	// execute the unit test
+	make check
+
 Protocol description
 --------------------
 


More information about the Libreoffice-commits mailing list