port(2V0-b): verify window tree and fix 64-bit LZO lengths
This commit is contained in:
@@ -9,10 +9,12 @@
|
||||
#include "EterPack/StdAfx.h"
|
||||
#include "EterPack/EterPackManager.h"
|
||||
#include "EterBase/CRC32.h"
|
||||
#include "EterBase/lzo.h"
|
||||
#include "../src/platform/UserInterface/UserInterface.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@@ -73,6 +75,16 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
PackSingletons();
|
||||
// A 32-bit pack header must round-trip through liblzo's native-width output parameter.
|
||||
const char sample[] = "40250 pack LZO length on a 64-bit host";
|
||||
CLZObject compressed;
|
||||
compressed.BeginCompress(sample, sizeof(sample));
|
||||
CHECK(compressed.Compress());
|
||||
CLZObject restored;
|
||||
CHECK(restored.BeginDecompress(compressed.GetBuffer()));
|
||||
CHECK(restored.Decompress());
|
||||
CHECK(restored.GetSize() == sizeof(sample));
|
||||
CHECK(std::memcmp(restored.GetBuffer(), sample, sizeof(sample)) == 0);
|
||||
CHECK(PackInitialize("pack"));
|
||||
CEterPackManager& mgr = CEterPackManager::Instance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user