summaryrefslogtreecommitdiff
path: root/shell/qa
diff options
context:
space:
mode:
Diffstat (limited to 'shell/qa')
-rw-r--r--shell/qa/zip/testzipimpl.cxx16
-rw-r--r--shell/qa/zip/testzipimpl.hxx7
-rw-r--r--shell/qa/zip/ziptest.cxx16
3 files changed, 21 insertions, 18 deletions
diff --git a/shell/qa/zip/testzipimpl.cxx b/shell/qa/zip/testzipimpl.cxx
index 8fe27d9caffb..e669b6a8b40d 100644
--- a/shell/qa/zip/testzipimpl.cxx
+++ b/shell/qa/zip/testzipimpl.cxx
@@ -19,8 +19,9 @@
#include "testzipimpl.hxx"
-TestZipImpl::TestZipImpl(StreamInterface *stream) :
- zipFile(ZipFile(stream)), expectedContents()
+TestZipImpl::TestZipImpl(StreamInterface* stream)
+ : zipFile(ZipFile(stream))
+ , expectedContents()
{
expectedContents.push_back("mimetype");
expectedContents.push_back("Configurations2/statusbar/");
@@ -42,22 +43,17 @@ TestZipImpl::TestZipImpl(StreamInterface *stream) :
sort(expectedContents.begin(), expectedContents.end());
}
-TestZipImpl::~TestZipImpl()
-{
-}
+TestZipImpl::~TestZipImpl() {}
bool TestZipImpl::test_directory()
{
ZipFile::DirectoryPtr_t contents = zipFile.GetDirectory();
- vector<string> &stringVector = *contents;
+ vector<string>& stringVector = *contents;
sort(stringVector.begin(), stringVector.end());
return expectedContents == stringVector;
}
-bool TestZipImpl::test_hasContentCaseInSensitive()
-{
- return zipFile.HasContent("mimetype");
-}
+bool TestZipImpl::test_hasContentCaseInSensitive() { return zipFile.HasContent("mimetype"); }
bool TestZipImpl::test_getContent()
{
diff --git a/shell/qa/zip/testzipimpl.hxx b/shell/qa/zip/testzipimpl.hxx
index b0f4b91b172d..ae1ff8cedd72 100644
--- a/shell/qa/zip/testzipimpl.hxx
+++ b/shell/qa/zip/testzipimpl.hxx
@@ -30,11 +30,12 @@ using namespace std;
class TestZipImpl
{
- private:
+private:
ZipFile zipFile;
vector<string> expectedContents;
- public:
- explicit TestZipImpl(StreamInterface *stream);
+
+public:
+ explicit TestZipImpl(StreamInterface* stream);
~TestZipImpl();
bool test_directory();
bool test_hasContentCaseInSensitive();
diff --git a/shell/qa/zip/ziptest.cxx b/shell/qa/zip/ziptest.cxx
index 7af18912abd2..2ebe056d5b8b 100644
--- a/shell/qa/zip/ziptest.cxx
+++ b/shell/qa/zip/ziptest.cxx
@@ -18,7 +18,7 @@
*/
#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <ole2.h>
@@ -38,6 +38,7 @@ class Test : public CppUnit::TestFixture
private:
wstring documentName;
LPSTREAM pStream;
+
public:
Test();
void test_file_directory();
@@ -58,7 +59,9 @@ public:
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
-Test::Test() : documentName(), pStream(nullptr)
+Test::Test()
+ : documentName()
+ , pStream(nullptr)
{
const wchar_t* pSrcRoot = _wgetenv(L"SRC_ROOT");
if (pSrcRoot)
@@ -69,7 +72,8 @@ Test::Test() : documentName(), pStream(nullptr)
documentName.append(L"shell/qa/zip/simpledocument.odt");
// Create an IStream pointer from the file
- HANDLE hFile = CreateFileW(documentName.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr);
+ HANDLE hFile
+ = CreateFileW(documentName.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr);
DWORD dwFileSize = GetFileSize(hFile, nullptr);
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, dwFileSize);
@@ -90,7 +94,8 @@ void Test::test_file_directory()
FileStream stream(documentName.c_str());
TestZipImpl testImpl(&stream);
bool isPassed = testImpl.test_directory();
- CPPUNIT_ASSERT_MESSAGE("FileStream: Content does not match with expected directory names.", isPassed);
+ CPPUNIT_ASSERT_MESSAGE("FileStream: Content does not match with expected directory names.",
+ isPassed);
}
void Test::test_file_hasContentCaseInSensitive()
@@ -114,7 +119,8 @@ void Test::test_stream_directory()
BufferStream stream(pStream);
TestZipImpl testImpl(&stream);
bool isPassed = testImpl.test_directory();
- CPPUNIT_ASSERT_MESSAGE("BufferStream: Content does not match with expected directory names.", isPassed);
+ CPPUNIT_ASSERT_MESSAGE("BufferStream: Content does not match with expected directory names.",
+ isPassed);
}
void Test::test_stream_hasContentCaseInSensitive()