[Libreoffice] how to acquire an ScDocument reference "from scratch"

Michael Meeks michael.meeks at suse.com
Thu Nov 24 03:25:59 PST 2011


Hi Kevin,

On Thu, 2011-11-24 at 01:05 -0500, Kevin Hunter wrote:
> I wanted to create an ScDocument to work with in a new test file.  I was 
> thinking in terms of test driven development and having some tests such 
> that I could execute only them, as something akin to:
> 
> $ make  just_this_set_of_tests

	Ah - you just want to run a smaller set of tests, and faster than
running all of the 'make unittest' changes in master ?

> I was educated that because each separate test file needs an entirely 
> separate invocation of soffice (and all that that entails),

	Nah - it's not soffice; but a unit test linked with some biggish chunks
of code.

> Thus, the answer to my question boiled down to: during development
> or bug hunting, comment out all superfluous tests in another, existing
> test file.

	I would suggest two things:

	a) we can add an environment variable and check for it in
	   gnumake such that only one set of tests is run:

	make TEST_SUBSET=filters-test unitcheck

	or somesuch.

	b) we could (try) to hack cppunit to stringify the test-name in
	   it's macros; so you could specify just one test to run:

	make TEST_SUBSET=filters-test TESTS=testDatabaseRanges unitcheck

	And do some cunning filtering somewhere there - might require more
cppunit patching / tweaking [ if that is not there already, perhaps it
is ].

	But of course; the easy & quick way out is to comment these out I
guess.

	HTH,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list