2000-03-28 23:23:48 +00:00
|
|
|
/*
|
|
|
|
*****************************************************************************************
|
|
|
|
* *
|
|
|
|
* COPYRIGHT: *
|
|
|
|
* (C) Copyright International Business Machines Corporation, 2000 *
|
|
|
|
* Licensed Material - Program-Property of IBM - All Rights Reserved. *
|
|
|
|
* US Government Users Restricted Rights - Use, duplication, or disclosure *
|
|
|
|
* restricted by GSA ADP Schedule Contract with IBM Corp. *
|
|
|
|
* *
|
|
|
|
*****************************************************************************************
|
|
|
|
************************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 03/22/2000 Madhu Creation.
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef UNIFLTLOGICTST_H
|
|
|
|
#define UNIFLTLOGICTST_H
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/translit.h"
|
|
|
|
#include "unicode/unifltlg.h"
|
|
|
|
#include "intltest.h"
|
|
|
|
|
|
|
|
class UnicodeFilterLogic;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @summary General test of UnicodeFilterLogic API
|
|
|
|
*/
|
|
|
|
class UnicodeFilterLogicTest : public IntlTest {
|
|
|
|
public:
|
2000-08-14 21:42:36 +00:00
|
|
|
void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
|
|
|
/*Tests all the NOT, OR and AND filters */
|
|
|
|
void TestAll(void);
|
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void TestNOT(Transliterator& t,
|
|
|
|
const UnicodeFilter* f1,
|
|
|
|
const UnicodeString& message,
|
|
|
|
const UnicodeString& source,
|
|
|
|
const UnicodeString& expected);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void TestAND(Transliterator& t,
|
|
|
|
const UnicodeFilter* f1,
|
|
|
|
const UnicodeFilter* f2,
|
|
|
|
const UnicodeString& message,
|
|
|
|
const UnicodeString& source,
|
|
|
|
const UnicodeString& expected);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void TestOR(Transliterator& t,
|
|
|
|
const UnicodeFilter* f1,
|
|
|
|
const UnicodeFilter* f2,
|
|
|
|
const UnicodeString& message,
|
|
|
|
const UnicodeString& source,
|
|
|
|
const UnicodeString& expected);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
//support functions
|
|
|
|
void expect(const Transliterator& t,
|
|
|
|
const UnicodeString& message,
|
|
|
|
const UnicodeString& source,
|
|
|
|
const UnicodeString& expectedResult);
|
|
|
|
|
|
|
|
void expectAux(const UnicodeString& tag,
|
|
|
|
const UnicodeString& summary, UBool pass,
|
|
|
|
const UnicodeString& expectedResult);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|