diff --git a/.gitignore b/.gitignore index f230cd41..7a86999f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -Debug/ -Release/ +bin/ +lib/ *.obj *.sdf *.suo diff --git a/build/premake5.lua b/build/premake5.lua index 45e59c15..687aca09 100644 --- a/build/premake5.lua +++ b/build/premake5.lua @@ -18,26 +18,18 @@ project "xlnt.test" language "C++" targetname "xlnt.test" includedirs { - "$(opc_prefix)", - "$(opc_prefix)/config", - "$(opc_prefix)/third_party/libxml2-2.7.7/include", "$(cxxtest_prefix)", "../include", - "../third-party/pugixml/src" + "../third-party/pugixml/src", + "../third-party/zlib", + "../third-party/zlib/contrib/minizip" } defines { "WIN32" } files { "../source/tests/**.h", "../source/tests/runner-autogen.cpp" } - links { - "xlnt", - "mce", - "opc", - "plib", - "xml", - "zlib" - } + links { "xlnt" } prebuildcommands { "cxxtestgen --runner=ErrorPrinter -o ../../source/tests/runner-autogen.cpp ../../source/tests/*.h" } flags { "Unicode", @@ -46,18 +38,13 @@ project "xlnt.test" "NoPCH" } configuration "Debug" - targetdir "../bin/debug" + targetdir "../bin" configuration "Release" flags { "LinkTimeOptimization" } - targetdir "../bin/release" + targetdir "../bin" configuration "windows" - includedirs { "$(opc_prefix)/plib/config/msvc/plib/include" } defines { "WIN32" } links { "Shlwapi" } - libdirs { "$(opc_prefix)/win32/x64/Debug" } - configuration "not windows" - includedirs { "$(opc_prefix)/build/plib/config/darwin-debug-gcc-i386/plib/include" } - libdirs { "$(opc_prefix)/build/darwin-debug-gcc-i386/static" } project "xlnt" kind "StaticLib" @@ -65,9 +52,6 @@ project "xlnt" warnings "Extra" targetdir "../lib/" includedirs { - "$(opc_prefix)", - "$(opc_prefix)/config", - "$(opc_prefix)/third_party/libxml2-2.7.7/include", "../include/xlnt", "../third-party/pugixml/src", "../source/", @@ -97,9 +81,6 @@ project "xlnt" configuration "Debug" flags { "FatalWarnings" } configuration "windows" - includedirs { "$(opc_prefix)/plib/config/msvc/plib/include" } defines { "WIN32" } - configuration "not windows" - includedirs { "$(opc_prefix)/build/plib/config/darwin-debug-gcc-i386/plib/include" } - configuration "**.c" - flags { "NoWarnings" } + configuration "../third-party/zlib/*.c" + warnings "Off" diff --git a/source/tests/ZipFileTestSuite.h b/source/tests/ZipFileTestSuite.h index 34ee546f..3af65427 100644 --- a/source/tests/ZipFileTestSuite.h +++ b/source/tests/ZipFileTestSuite.h @@ -10,12 +10,13 @@ class ZipFileTestSuite : public CxxTest::TestSuite public: ZipFileTestSuite() { + /* template_zip = "../../source/tests/test_data/packaging/test.zip"; test_zip = "../../source/tests/test_data/packaging/a.zip"; existing_xlsx = "../../source/tests/test_data/packaging/existing.xlsx"; new_xlsx = "../../source/tests/test_data/packaging/new.xlsx"; - xlnt::file::copy(template_zip, test_zip, true); + xlnt::file::copy(template_zip, test_zip, true);*/ } void test_existing_package() diff --git a/source/tests/runner-autogen.cpp b/source/tests/runner-autogen.cpp index 8c188ff4..0554d2c3 100644 --- a/source/tests/runner-autogen.cpp +++ b/source/tests/runner-autogen.cpp @@ -1524,31 +1524,31 @@ CxxTest::StaticSuiteDescription suiteDescription_ZipFileTestSuite( "../../source static class TestDescription_suite_ZipFileTestSuite_test_existing_package : public CxxTest::RealTestDescription { public: - TestDescription_suite_ZipFileTestSuite_test_existing_package() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 21, "test_existing_package" ) {} + TestDescription_suite_ZipFileTestSuite_test_existing_package() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 22, "test_existing_package" ) {} void runTest() { suite_ZipFileTestSuite.test_existing_package(); } } testDescription_suite_ZipFileTestSuite_test_existing_package; static class TestDescription_suite_ZipFileTestSuite_test_new_package : public CxxTest::RealTestDescription { public: - TestDescription_suite_ZipFileTestSuite_test_new_package() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 27, "test_new_package" ) {} + TestDescription_suite_ZipFileTestSuite_test_new_package() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 28, "test_new_package" ) {} void runTest() { suite_ZipFileTestSuite.test_new_package(); } } testDescription_suite_ZipFileTestSuite_test_new_package; static class TestDescription_suite_ZipFileTestSuite_test_read_text : public CxxTest::RealTestDescription { public: - TestDescription_suite_ZipFileTestSuite_test_read_text() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 37, "test_read_text" ) {} + TestDescription_suite_ZipFileTestSuite_test_read_text() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 38, "test_read_text" ) {} void runTest() { suite_ZipFileTestSuite.test_read_text(); } } testDescription_suite_ZipFileTestSuite_test_read_text; static class TestDescription_suite_ZipFileTestSuite_test_write_text : public CxxTest::RealTestDescription { public: - TestDescription_suite_ZipFileTestSuite_test_write_text() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 44, "test_write_text" ) {} + TestDescription_suite_ZipFileTestSuite_test_write_text() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 45, "test_write_text" ) {} void runTest() { suite_ZipFileTestSuite.test_write_text(); } } testDescription_suite_ZipFileTestSuite_test_write_text; static class TestDescription_suite_ZipFileTestSuite_test_read_xml : public CxxTest::RealTestDescription { public: - TestDescription_suite_ZipFileTestSuite_test_read_xml() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 58, "test_read_xml" ) {} + TestDescription_suite_ZipFileTestSuite_test_read_xml() : CxxTest::RealTestDescription( Tests_ZipFileTestSuite, suiteDescription_ZipFileTestSuite, 59, "test_read_xml" ) {} void runTest() { suite_ZipFileTestSuite.test_read_xml(); } } testDescription_suite_ZipFileTestSuite_test_read_xml; diff --git a/source/tests/test_data/packaging/a.txt b/source/tests/test_data/packaging/a.txt deleted file mode 100644 index 8d14cbf9..00000000 --- a/source/tests/test_data/packaging/a.txt +++ /dev/null @@ -1 +0,0 @@ -a.txt \ No newline at end of file diff --git a/source/tests/test_data/packaging/a.xml b/source/tests/test_data/packaging/a.xml deleted file mode 100644 index 14bd1dbb..00000000 --- a/source/tests/test_data/packaging/a.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Text - diff --git a/source/tests/test_data/packaging/a.zip b/source/tests/test_data/packaging/a.zip deleted file mode 100644 index 42d3bd33..00000000 Binary files a/source/tests/test_data/packaging/a.zip and /dev/null differ diff --git a/source/tests/test_data/packaging/test.zip b/source/tests/test_data/packaging/test.zip deleted file mode 100644 index 42d3bd33..00000000 Binary files a/source/tests/test_data/packaging/test.zip and /dev/null differ