initial check-in for TIFFTranslator Tests (they don't actually test anything yet)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2889 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0ef3968843
commit
3d4100d5c3
83
src/tests/add-ons/translators/tifftranslator/TIFFTranslatorTest.cpp
Executable file
83
src/tests/add-ons/translators/tifftranslator/TIFFTranslatorTest.cpp
Executable file
@ -0,0 +1,83 @@
|
||||
// TIFFTranslatorTest.cpp
|
||||
#include "TIFFTranslatorTest.h"
|
||||
#include <cppunit/Test.h>
|
||||
#include <cppunit/TestCaller.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <image.h>
|
||||
#include <Translator.h>
|
||||
#include <TranslatorFormats.h>
|
||||
#include <TranslatorRoster.h>
|
||||
#include <Message.h>
|
||||
#include <View.h>
|
||||
#include <Rect.h>
|
||||
#include <File.h>
|
||||
#include <DataIO.h>
|
||||
#include <Errors.h>
|
||||
#include <OS.h>
|
||||
#include "../../../../add-ons/translators/tifftranslator/TIFFTranslator.h"
|
||||
|
||||
// Suite
|
||||
CppUnit::Test *
|
||||
TIFFTranslatorTest::Suite()
|
||||
{
|
||||
CppUnit::TestSuite *suite = new CppUnit::TestSuite();
|
||||
typedef CppUnit::TestCaller<TIFFTranslatorTest> TC;
|
||||
|
||||
suite->addTest(
|
||||
new TC("TIFFTranslator IdentifyTest",
|
||||
&TIFFTranslatorTest::IdentifyTest));
|
||||
|
||||
suite->addTest(
|
||||
new TC("TIFFTranslator TranslateTest",
|
||||
&TIFFTranslatorTest::TranslateTest));
|
||||
|
||||
#if !TEST_R5
|
||||
suite->addTest(
|
||||
new TC("TIFFTranslator LoadAddOnTest",
|
||||
&TIFFTranslatorTest::LoadAddOnTest));
|
||||
#endif
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
||||
// setUp
|
||||
void
|
||||
TIFFTranslatorTest::setUp()
|
||||
{
|
||||
BTestCase::setUp();
|
||||
}
|
||||
|
||||
// tearDown
|
||||
void
|
||||
TIFFTranslatorTest::tearDown()
|
||||
{
|
||||
BTestCase::tearDown();
|
||||
}
|
||||
|
||||
void
|
||||
TIFFTranslatorTest::IdentifyTest()
|
||||
{
|
||||
// Init
|
||||
NextSubTest();
|
||||
}
|
||||
|
||||
void
|
||||
TIFFTranslatorTest::TranslateTest()
|
||||
{
|
||||
// Init
|
||||
NextSubTest();
|
||||
}
|
||||
|
||||
#if !TEST_R5
|
||||
|
||||
void
|
||||
TIFFTranslatorTest::LoadAddOnTest()
|
||||
{
|
||||
// Make sure the add_on loads
|
||||
NextSubTest();
|
||||
}
|
||||
|
||||
#endif // #if !TEST_R5
|
31
src/tests/add-ons/translators/tifftranslator/TIFFTranslatorTest.h
Executable file
31
src/tests/add-ons/translators/tifftranslator/TIFFTranslatorTest.h
Executable file
@ -0,0 +1,31 @@
|
||||
// TIFFTranslatorTest.h
|
||||
|
||||
#ifndef TIFF_TRANSLATOR_TEST_H
|
||||
#define TIFF_TRANSLATOR_TEST_H
|
||||
|
||||
#include <TestCase.h>
|
||||
#include <TestShell.h>
|
||||
|
||||
class CppUnit::Test;
|
||||
|
||||
class TIFFTranslatorTest : public BTestCase {
|
||||
public:
|
||||
static CppUnit::Test* Suite();
|
||||
|
||||
// This function called before *each* test added in Suite()
|
||||
void setUp();
|
||||
|
||||
// This function called after *each* test added in Suite()
|
||||
void tearDown();
|
||||
|
||||
//------------------------------------------------------------
|
||||
// Test functions
|
||||
//------------------------------------------------------------
|
||||
#if !TEST_R5
|
||||
void LoadAddOnTest();
|
||||
#endif
|
||||
void IdentifyTest();
|
||||
void TranslateTest();
|
||||
};
|
||||
|
||||
#endif // TIFF_TRANSLATOR_TEST_H
|
Loading…
Reference in New Issue
Block a user