diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-30 19:52:46 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-31 12:31:36 +0200 |
commit | d6fd97b4c90625b59f96d0017790eb2e2c996e49 (patch) | |
tree | 2dba3edf5246f62b228184db8d24081a40f7700a /libreofficekit | |
parent | 3c115cd0474ac19240f491f6dcd1f1ec994a60da (diff) |
Make common paths member variables.
We'll need these for other tests too.
Change-Id: Ia99c2e60f5e5bb24a83875a9dcf85a6b4f54beb4
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/unit/tiledrendering.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index 4e1c0fa8b02d..0d4aa95a8c31 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -36,6 +36,10 @@ using namespace ::std; class TiledRenderingTest : public ::CppUnit::TestFixture { public: + const string m_sSrcRoot = getenv( "SRC_ROOT" ); + const string m_sInstDir = getenv( "INSTDIR" ); + const string m_sLOPath = m_sInstDir + "/program"; + TiledRenderingTest() {} void testOverlay(); @@ -64,11 +68,8 @@ static void dumpRGBABitmap( const OUString& rPath, const unsigned char* pBuffer, void TiledRenderingTest::testOverlay() { - const string sSrcRoot = getenv( "SRC_ROOT" ); - const string sInstDir = getenv( "INSTDIR" ); - const string sLOPath = sInstDir + "/program"; - const string sDocPath = sSrcRoot + "/odk/examples/java/DocumentHandling/test/test1.odt"; - const string sLockFile = sSrcRoot + "/odk/examples/java/DocumentHandling/test/.~lock.test1.odt#"; + const string sDocPath = m_sSrcRoot + "/odk/examples/java/DocumentHandling/test/test1.odt"; + const string sLockFile = m_sSrcRoot + "/odk/examples/java/DocumentHandling/test/.~lock.test1.odt#"; // FIXME: this is a temporary hack: LOK will fail when trying to open a // locked file, and since we're reusing the file for a different unit @@ -77,7 +78,7 @@ void TiledRenderingTest::testOverlay() remove( sLockFile.c_str() ); scoped_ptr< Office > pOffice( lok_cpp_init( - sLOPath.c_str() ) ); + m_sLOPath.c_str() ) ); CPPUNIT_ASSERT( pOffice.get() ); scoped_ptr< Document> pDocument( pOffice->documentLoad( |