added GetConfigurationMessage test and removed an entry for a test file that doesn't exist
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3340 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -32,7 +32,11 @@ STXTTranslatorTest::Suite()
|
||||
|
||||
suite->addTest(
|
||||
new TC("STXTTranslator TranslateTest",
|
||||
&STXTTranslatorTest::TranslateTest));
|
||||
&STXTTranslatorTest::TranslateTest));
|
||||
|
||||
suite->addTest(
|
||||
new TC("STXTTranslator ConfigMessageTest",
|
||||
&STXTTranslatorTest::ConfigMessageTest));
|
||||
|
||||
#if !TEST_R5
|
||||
suite->addTest(
|
||||
@@ -182,7 +186,6 @@ STXTTranslatorTest::IdentifyTest()
|
||||
"../src/tests/kits/translation/data/text/sentence.stxt",
|
||||
"../src/tests/kits/translation/data/text/symbols.stxt",
|
||||
"../src/tests/kits/translation/data/text/zero_length.stxt",
|
||||
"../src/tests/kits/translation/data/text/zero_length_styl.stxt"
|
||||
};
|
||||
IdentifyTests(this, proster, aPlainFiles,
|
||||
sizeof(aPlainFiles) / sizeof(const char *), true);
|
||||
@@ -367,6 +370,37 @@ STXTTranslatorTest::TranslateTest()
|
||||
sizeof(aStyledTextFiles) / sizeof(const char *), false);
|
||||
}
|
||||
|
||||
// Make certain that the STXTTranslator does not
|
||||
// provide a configuration message
|
||||
void
|
||||
STXTTranslatorTest::ConfigMessageTest()
|
||||
{
|
||||
// Init
|
||||
NextSubTest();
|
||||
status_t result = B_ERROR;
|
||||
BTranslatorRoster *proster = new BTranslatorRoster();
|
||||
CPPUNIT_ASSERT(proster);
|
||||
CPPUNIT_ASSERT(proster->AddTranslators(
|
||||
"/boot/home/config/add-ons/Translators/STXTTranslator") == B_OK);
|
||||
|
||||
// GetAllTranslators
|
||||
NextSubTest();
|
||||
translator_id tid, *pids = NULL;
|
||||
int32 count = 0;
|
||||
CPPUNIT_ASSERT(proster->GetAllTranslators(&pids, &count) == B_OK);
|
||||
CPPUNIT_ASSERT(pids);
|
||||
CPPUNIT_ASSERT(count == 1);
|
||||
tid = pids[0];
|
||||
delete[] pids;
|
||||
pids = NULL;
|
||||
|
||||
// GetConfigurationMessage
|
||||
NextSubTest();
|
||||
BMessage msg;
|
||||
CPPUNIT_ASSERT(proster->GetConfigurationMessage(tid, &msg) == B_ERROR);
|
||||
CPPUNIT_ASSERT(msg.IsEmpty());
|
||||
}
|
||||
|
||||
#if !TEST_R5
|
||||
|
||||
// The input formats that this translator is supposed to support
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
#endif
|
||||
void IdentifyTest();
|
||||
void TranslateTest();
|
||||
void ConfigMessageTest();
|
||||
};
|
||||
|
||||
#endif // STXT_TRANSLATOR_TEST_H
|
||||
|
||||
Reference in New Issue
Block a user