Home | History | Annotate | Download | only in intltest
      1 //  2016 and later: Unicode, Inc. and others.
      2 // License & terms of use: http://www.unicode.org/copyright.html
      3 /*
      4  *******************************************************************************
      5  *
      6  *   Copyright (C) 2005, International Business Machines
      7  *   Corporation and others.  All Rights Reserved.
      8  *
      9  *******************************************************************************
     10  *
     11  *   created on: 2005jun15
     12  *   created by: Raymond Yang
     13  */
     14 
     15 #ifndef IDNA_CONF_TEST_H
     16 #define IDNA_CONF_TEST_H
     17 
     18 #include "intltest.h"
     19 #include "unicode/ustring.h"
     20 
     21 
     22 class IdnaConfTest: public IntlTest {
     23 public:
     24     void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
     25     IdnaConfTest();
     26     virtual ~IdnaConfTest();
     27 private:
     28     void Test(void);
     29 
     30     // for test file handling
     31     UChar* base;
     32     int len ;
     33     int curOffset;
     34 
     35     UBool  ReadAndConvertFile();
     36     int isNewlineMark();
     37     UBool ReadOneLine(UnicodeString&);
     38 
     39     // for parsing one test record
     40     UnicodeString id;   // for debug & error output
     41     UnicodeString namebase;
     42     UnicodeString namezone;
     43     int type;     // 0 toascii,             1 tounicode
     44     int option;   // 0 UseSTD3ASCIIRules,   1 ALLOW_UNASSIGNED
     45     int passfail; // 0 pass,                1 fail
     46 
     47     void ExplainCodePointTag(UnicodeString& buf);
     48     void Call();
     49 };
     50 
     51 #endif /*IDNA_CONF_TEST_H*/
     52