Clean up some tests.
This commit is contained in:
parent
b17ba8b3a7
commit
c102ebb6da
64 changed files with 615 additions and 541 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "PngReader.h"
|
||||
|
||||
#include "BitStream.h"
|
||||
#include "TestUtils.h"
|
||||
|
||||
#include "Image.h"
|
||||
#include <iostream>
|
||||
|
@ -9,7 +10,7 @@
|
|||
|
||||
TEST_CASE(TestThirdPartyPng, "image")
|
||||
{
|
||||
const auto path = "/home/jmsgrogan/Downloads/test.png";
|
||||
const auto path = TestUtils::getTestDataDir() / "test.png";
|
||||
|
||||
//const auto path = "/home/jmsgrogan/Downloads/index.png";
|
||||
|
||||
|
@ -30,7 +31,7 @@ TEST_CASE(TestThirdPartyPng, "image")
|
|||
|
||||
TEST_CASE(TestFxedCodePng, "image")
|
||||
{
|
||||
const auto path = "/home/jmsgrogan/code/MediaTool-build/bin/test_fixed.png";
|
||||
const auto path = TestUtils::getTestDataDir() / "test_fixed.png";
|
||||
|
||||
//File file(path);
|
||||
//std::cout << file.dumpBinary();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "ImagePrimitives.h"
|
||||
|
||||
#include "TestFramework.h"
|
||||
|
||||
#include "TestUtils.h"
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE(TestCompressedPng, "image")
|
||||
|
@ -29,20 +29,18 @@ TEST_CASE(TestCompressedPng, "image")
|
|||
image->setData(data);
|
||||
|
||||
PngWriter writer;
|
||||
writer.setPath("test_compressed.png");
|
||||
writer.setPath(TestUtils::getTestOutputDir() / "test_compressed.png");
|
||||
writer.setCompressionMethod(Deflate::CompressionMethod::NONE);
|
||||
writer.write(image);
|
||||
|
||||
return;
|
||||
File test_file("test_compressed.png");
|
||||
test_file.SetAccessMode(File::AccessMode::Read);
|
||||
test_file.Open(true);
|
||||
File test_file(TestUtils::getTestOutputDir() / "test_compressed.png");
|
||||
test_file.open(File::AccessMode::Read);
|
||||
|
||||
while(auto byte = test_file.readNextByte())
|
||||
{
|
||||
//std::cout << static_cast<unsigned>(*byte) << std::endl;
|
||||
}
|
||||
test_file.Close();
|
||||
}
|
||||
|
||||
TEST_CASE(TestFixedPng, "image")
|
||||
|
@ -65,12 +63,12 @@ TEST_CASE(TestFixedPng, "image")
|
|||
image->setData(data);
|
||||
|
||||
PngWriter writer;
|
||||
writer.setPath("test_fixed.png");
|
||||
writer.setPath(TestUtils::getTestOutputDir() / "test_fixed.png");
|
||||
writer.setCompressionMethod(Deflate::CompressionMethod::FIXED_HUFFMAN);
|
||||
writer.write(image);
|
||||
|
||||
//return;
|
||||
File test_file("test_fixed.png");
|
||||
File test_file(TestUtils::getTestOutputDir() / "test_fixed.png");
|
||||
//std::cout << test_file.dumpBinary();
|
||||
|
||||
}
|
||||
|
@ -95,10 +93,10 @@ TEST_CASE(TestDynamicCompressedPng, "image")
|
|||
image->setData(data);
|
||||
|
||||
PngWriter writer;
|
||||
writer.setPath("test_dynamic.png");
|
||||
writer.setPath(TestUtils::getTestOutputDir() / "test_dynamic.png");
|
||||
writer.write(image);
|
||||
|
||||
//return;
|
||||
File test_file("test_dynamic.png");
|
||||
File test_file(TestUtils::getTestOutputDir() / "test_dynamic.png");
|
||||
//std::cout << test_file.dumpBinary();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue