diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-06-19 12:58:51 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-06-19 20:46:13 +0200 |
commit | 1f7a367f0d3722502561701cbafae448cb11cbb3 (patch) | |
tree | 818ac29c5617e8d5afb165b6096214785fa1f521 /cppcanvas | |
parent | fc72d1d0c635031b577a12ffbfa79bd04adbae66 (diff) |
CppunitTest_cppcanvas_test: generalize testComposite
Make it pass without cairo canvas.
Change-Id: I81dd5d21bde6d1e09c2e8eeea75d05ddf1793d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153263
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/CppunitTest_cppcanvas_test.mk | 1 | ||||
-rw-r--r-- | cppcanvas/qa/unit/test.cxx | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/cppcanvas/CppunitTest_cppcanvas_test.mk b/cppcanvas/CppunitTest_cppcanvas_test.mk index 020015da3aa3..9e9a1c9eaf60 100644 --- a/cppcanvas/CppunitTest_cppcanvas_test.mk +++ b/cppcanvas/CppunitTest_cppcanvas_test.mk @@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_vcl,cppcanvas_test)) $(eval $(call gb_CppunitTest_use_components,cppcanvas_test,\ $(if $(ENABLE_CAIRO_CANVAS),canvas/source/cairo/cairocanvas) \ + canvas/source/vcl/vclcanvas \ canvas/source/factory/canvasfactory \ configmgr/source/configmgr \ i18npool/util/i18npool \ diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx index 1ad9139641a8..9454df0f2ecc 100644 --- a/cppcanvas/qa/unit/test.cxx +++ b/cppcanvas/qa/unit/test.cxx @@ -30,12 +30,10 @@ public: CPPUNIT_TEST_FIXTURE(CanvasTest, testComposite) { -#if ENABLE_CAIRO_CANVAS ScopedVclPtrInstance<WorkWindow> pWin( nullptr, WB_STDWORK ); uno::Reference<rendering::XCanvas> xCanvas = pWin->GetOutDev()->GetCanvas (); - if( !xCanvas.is() ) - return; // can't get a canvas working at all - truly headless ? + CPPUNIT_ASSERT(xCanvas.is()); // a huge canvas ... Size aSize (1, 1); @@ -70,8 +68,6 @@ CPPUNIT_TEST_FIXTURE(CanvasTest, testComposite) XCachedPrimitive fillPolyPolygon( [in] XPolyPolygon2D xPolyPolygon, [in] ViewState aViewState, [in] RenderState aRenderState ) #endif } - -#endif } CPPUNIT_PLUGIN_IMPLEMENT(); |