DDraceNetwork Docs
compression.cpp File Reference
#include <gtest/gtest.h>
#include <engine/shared/compression.h>
Include dependency graph for compression.cpp:

Functions

 TEST (CVariableInt, RoundtripPackUnpack)
 
 TEST (CVariableInt, UnpackInvalid)
 
 TEST (CVariableInt, PackBufferTooSmall)
 
 TEST (CVariableInt, UnpackBufferTooSmall)
 
 TEST (CVariableInt, RoundtripCompressDecompress)
 
 TEST (CVariableInt, CompressBufferTooSmall)
 
 TEST (CVariableInt, DecompressBufferTooSmall)
 

Variables

static const int DATA [] = {0, 1, -1, 32, 64, 256, -512, 12345, -123456, 1234567, 12345678, 123456789, 2147483647, (-2147483647 - 1)}
 
static const int NUM = std::size(DATA)
 
static const int SIZES [NUM] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5}
 

Function Documentation

◆ TEST() [1/7]

TEST ( CVariableInt  ,
CompressBufferTooSmall   
)

◆ TEST() [2/7]

TEST ( CVariableInt  ,
DecompressBufferTooSmall   
)

◆ TEST() [3/7]

TEST ( CVariableInt  ,
PackBufferTooSmall   
)

◆ TEST() [4/7]

TEST ( CVariableInt  ,
RoundtripCompressDecompress   
)

◆ TEST() [5/7]

TEST ( CVariableInt  ,
RoundtripPackUnpack   
)

◆ TEST() [6/7]

TEST ( CVariableInt  ,
UnpackBufferTooSmall   
)

◆ TEST() [7/7]

TEST ( CVariableInt  ,
UnpackInvalid   
)

Variable Documentation

◆ DATA

const int DATA[] = {0, 1, -1, 32, 64, 256, -512, 12345, -123456, 1234567, 12345678, 123456789, 2147483647, (-2147483647 - 1)}
static

◆ NUM

const int NUM = std::size(DATA)
static

◆ SIZES

const int SIZES[NUM] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5}
static