コード例 #1
2
ファイル: frcoll.cpp プロジェクト: icu-project/icu4c
void CollationFrenchTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
{
    if (exec) logln("TestSuite CollationFrenchTest: ");

    if((!myCollation) && exec) {
        dataerrln(__FILE__ " cannot test - failed to create collator.");
        name = "some test";
        return;
    }

    switch (index) {
        case 0: name = "TestSecondary"; if (exec)   TestSecondary(/* par */); break;
        case 1: name = "TestTertiary";  if (exec)   TestTertiary(/* par */); break;
        case 2: name = "TestExtra";     if (exec)   TestExtra(/* par */); break;
        default: name = ""; break;
    }
}
コード例 #2
0
ファイル: encoll.cpp プロジェクト: 00zhengfu00/third_party
void CollationEnglishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
{
    if (exec) logln("TestSuite CollationEnglishTest: ");
    if(myCollation) {
      switch (index) {
          case 0: name = "TestPrimary";   if (exec)   TestPrimary(/* par */); break;
          case 1: name = "TestSecondary"; if (exec)   TestSecondary(/* par */); break;
          case 2: name = "TestTertiary";  if (exec)   TestTertiary(/* par */); break;
          default: name = ""; break;
      }
    } else {
      dataerrln("Collator couldn't be instantiated!");
      name = "";
    }
}