Add test fixture.

This commit is contained in:
James Grogan 2022-11-29 18:00:19 +00:00
parent af6fad72eb
commit d6d4319e21
37 changed files with 421 additions and 279 deletions

View file

@ -5,7 +5,9 @@
#include "Image.h"
#include <iostream>
void testThirdParty()
#include "TestFramework.h"
TEST_CASE(TestThirdPartyPng, "image")
{
const auto path = "/home/jmsgrogan/Downloads/test.png";
@ -26,7 +28,7 @@ void testThirdParty()
//}
}
void testFixedCode()
TEST_CASE(TestFxedCodePng, "image")
{
const auto path = "/home/jmsgrogan/code/MediaTool-build/bin/test_fixed.png";
@ -37,11 +39,3 @@ void testFixedCode()
reader.setPath(path);
auto image = reader.read();
}
int main()
{
testThirdParty();
//testFixedCode();
return 0;
}

View file

@ -6,9 +6,11 @@
#include "ByteUtils.h"
#include "ImagePrimitives.h"
#include "TestFramework.h"
#include <iostream>
void testCompressedPng()
TEST_CASE(TestCompressedPng, "image")
{
unsigned width = 20;
unsigned height = 20;
@ -43,7 +45,7 @@ void testCompressedPng()
test_file.Close();
}
void testFixedPng()
TEST_CASE(TestFixedPng, "image")
{
unsigned width = 10;
unsigned height = 10;
@ -73,7 +75,7 @@ void testFixedPng()
}
void testDynamicCompressedPng()
TEST_CASE(TestDynamicCompressedPng, "image")
{
unsigned width = 10;
unsigned height = 10;
@ -99,14 +101,4 @@ void testDynamicCompressedPng()
//return;
File test_file("test_dynamic.png");
std::cout << test_file.dumpBinary();
}
int main()
{
//testCompressedPng();
//testFixedPng();
testDynamicCompressedPng();
return 0;
}