Add test fixture.
This commit is contained in:
parent
af6fad72eb
commit
d6d4319e21
37 changed files with 421 additions and 279 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue