summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tplneend.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-07-18 06:46:38 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-07-21 08:52:54 +0200
commite0f990b96f901be00ba5b7dc6a671e6162c914cf (patch)
treecf50e276703586c051616480fe65dffb74043704 /cui/source/tabpages/tplneend.cxx
parent8e7cb9588812cdaac04adf4facbfdebd45b0f7af (diff)
osl: fix Pipe noacquire/acquire tests
There is an incomplete test of ::osl::Pipe::Pipe(oslPipe, __sal_NoAcquire), but the comments show that the tester wasn't able to figure out a way to test the noacquire variant of this constructor. However, they seem to have not just given up but copied and pasted the acquire and no acquire tests - the error codes for the acquire test talk about non-acquisition and don't actually see if the handle is the same or not. I have fixed this test. To test if the noacquire is working or not then you merely have to: 1. create a new Pipe instance 2. create a new Pipe non-acquired instance copy of the first instance 3. delete the non-acquired instance copy 4. try to send a single character to the original Pipe instance, which should return an error (negative return result) because at this point there is no valid pipe to operate on as the pipe should have been destroyed when you deleted the copy. If the send() succeeds, then this is a test failure. For the acquire test, it didn't actually test if the handles are the same - I have corrected this now. Change-Id: If868746233d3a222cc6f9e7cd0d453e70ef6c7cc Reviewed-on: https://gerrit.libreoffice.org/40102 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'cui/source/tabpages/tplneend.cxx')
0 files changed, 0 insertions, 0 deletions