From 4eb685d94e89a2aef61047225c1834a89de01de2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 28 Oct 2020 13:13:57 +0200 Subject: Simplify rcc - drop qrc parsing and zstd compression --- test/main.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 test/main.cpp (limited to 'test/main.cpp') diff --git a/test/main.cpp b/test/main.cpp deleted file mode 100644 index f18332c..0000000 --- a/test/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "resources.h" -#include "zstd_resources.h" -#include -#include - -int main(int, char **) -{ - constexpr auto size = staticdata::entries.size(); - constexpr embed::Resources static_ctx(staticdata::entries, staticdata::values); - const embed::CompressedResources zstd_ctx(zstd_data::entries, zstd_data::values, zstd_data::compression, zstd_data::dictionary); - for(std::size_t i = 0; i < size; ++i) { - const auto s = static_ctx.value(i); - const auto v = zstd_ctx.decompress(i); - - if(s.size() != v.size()) { - printf(" raw data at path [%s] size=%li\n", staticdata::entries.at(i), s.size()); - printf(" zstd data at path [%s] size=%li\n", zstd_data::entries.at(i), v.size()); - return EXIT_FAILURE; - } - - if(!std::equal(s.begin(), s.end(), v.begin(), v.end())) { - printf("failed comparing values at path [%s]\n", staticdata::entries.at(i)); - for(const char &c : s) - printf("%c", c); - for(const char &c : v) - printf("%c", c); - return EXIT_FAILURE; - } - } - printf("Zstd compression test complete\n"); - - return EXIT_SUCCESS; -} -- cgit v1.2.1