yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
compression_test.cc File Reference
#include "app/gfx/compression.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <array>
#include "absl/status/statusor.h"
#include "app/rom.h"
Include dependency graph for compression_test.cc:

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::test
 
namespace  yaze::test::gfx
 
namespace  yaze::test::gfx::anonymous_namespace{compression_test.cc}
 

Macros

#define BUILD_HEADER(command, length)
 

Functions

std::vector< uint8_t > yaze::test::gfx::anonymous_namespace{compression_test.cc}::ExpectCompressOk (Rom &rom, uchar *in, int in_size)
 
std::vector< uint8_t > yaze::test::gfx::anonymous_namespace{compression_test.cc}::ExpectDecompressBytesOk (Rom &rom, std::vector< uint8_t > &in)
 
std::vector< uint8_t > yaze::test::gfx::anonymous_namespace{compression_test.cc}::ExpectDecompressOk (Rom &rom, uchar *in, int in_size)
 
std::shared_ptr< CompressionPieceyaze::test::gfx::anonymous_namespace{compression_test.cc}::ExpectNewCompressionPieceOk (const char command, const int length, const std::string args, const int argument_length)
 
void yaze::test::gfx::anonymous_namespace{compression_test.cc}::AssertCompressionQuality (const std::vector< uint8_t > &uncompressed_data, const std::vector< uint8_t > &expected_compressed_data)
 
std::vector< uint8_t > yaze::test::gfx::anonymous_namespace{compression_test.cc}::ExpectCompressV3Ok (const std::vector< uint8_t > &uncompressed_data, const std::vector< uint8_t > &expected_compressed_data)
 
std::vector< uint8_t > yaze::test::gfx::anonymous_namespace{compression_test.cc}::CreateRepeatedBetweenUncompressable (int leftUncompressedSize, int repeatedByteSize, int rightUncompressedSize)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, TrivialRepeatedBytes)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, RepeatedBytesBetweenUncompressable)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, RepeatedBytesBeforeUncompressable)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, RepeatedBytesAfterUncompressable)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, RepeatedBytesAfterUncompressableRepeated)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, RepeatedBytesBeforeUncompressableRepeated)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, NewDecompressionPieceOk)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, CompressionSingleSet)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, CompressionSingleWord)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, CompressionSingleIncrement)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, CompressionSingleCopy)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, CompressionSingleOverflowIncrement)
 
 yaze::test::gfx::TEST (HandleDirectCopyTest, NotDirectCopyWithAccumulatedBytes)
 
 yaze::test::gfx::TEST (HandleDirectCopyTest, NotDirectCopyWithoutAccumulatedBytes)
 
 yaze::test::gfx::TEST (HandleDirectCopyTest, AccumulateBytesWithoutMax)
 
 yaze::test::gfx::TEST (CheckIncByteV3Test, IncreasingSequence)
 
 yaze::test::gfx::TEST (CheckIncByteV3Test, IncreasingSequenceSurroundedByIdenticalBytes)
 
 yaze::test::gfx::TEST (CheckIncByteV3Test, NotAnIncreasingSequence)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, DecompressionValidCommand)
 
 yaze::test::gfx::TEST (LC_LZ2_CompressionTest, DecompressionMixingCommand)
 

Macro Definition Documentation

◆ BUILD_HEADER

#define BUILD_HEADER ( command,
length )
Value:
(command << 5) + (length - 1)

Definition at line 11 of file compression_test.cc.