oox: Harden the testTdf142605_CurveSize Test with extra checks
commit2f48aae12ae949056654cb172873f4025104af67
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Mon, 24 Apr 2023 13:50:02 +0000 (24 22:50 +0900)
committerTomaž Vajngerl <quikee@gmail.com>
Tue, 25 Apr 2023 02:22:59 +0000 (25 04:22 +0200)
tree822f19d54d9820f81196000347d12ff2bed64537
parent398d64e32c60871315ca31524d7a204fb0576ebe
oox: Harden the testTdf142605_CurveSize Test with extra checks

Even if it is likely that we fail, it's important that we check
that we are checking thr correct shape and not some other shape.

As there is only one shape we could assume that in the case that
something goes wrong and we wouldn't be able to read the shape,
we would end up with 0 shapes, but in case of an empty page we
inject placeholder shapes into the page, so we end up comparing
the size of a placeholder shape. In this case the test assert
gets confusing as we obviously get wrong sizes, which suggest that
something is wrong with the shape and not that the shape we expect
to assert against is missing and we compare against a different
(placeholder) shape.

This adds more asserts, which make sure we actually have the
expected shape first and also preven crashes if something would
go wrong.

Change-Id: I435f87d7e634c5135a376ad084373f8d5053555e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150942
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
oox/qa/unit/drawingml.cxx