home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / tscoll.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  5.8 KB  |  265 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1997                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1998                    *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. */
  13.  
  14. /**
  15.  * IntlTestCollator is the medium level test class for everything in the directory "collate".
  16.  */
  17.  
  18. #include "utypes.h"
  19. #include "tscoll.h"
  20.  
  21. #include "encoll.h"
  22. #include "frcoll.h"
  23. #include "decoll.h"
  24. #include "dacoll.h"
  25. #include "escoll.h"
  26. #include "ficoll.h"
  27. #include "jacoll.h"
  28. #include "trcoll.h"
  29. #include "allcoll.h"
  30. #include "g7coll.h"
  31. #include "mnkytst.h"
  32. #include "apicoll.h"
  33. #include "regcoll.h"
  34. #include "currcoll.h"
  35. #include "itercoll.h"
  36. //#include "capicoll.h"   // CollationCAPITest
  37. #include "tstnorm.h"
  38.  
  39. void IntlTestCollator::runIndexedTest( int32_t index, bool_t exec, char* &name, char* par )
  40. {
  41.     if (exec)
  42.     {
  43.         logln("TestSuite Collator: ");
  44.     }
  45.  
  46.     switch (index)
  47.     {
  48.     case 0:
  49.         name = "CollationEnglishTest";
  50.  
  51.         if (exec)
  52.         {
  53.             logln("CollationEnglishtest---");
  54.             logln("");
  55.  
  56.             CollationEnglishTest test;
  57.             callTest( test, par );
  58.         }
  59.         break;
  60.  
  61.     case 1:
  62.         name = "CollationFrenchTest";
  63.         
  64.         if (exec)
  65.         {
  66.             logln("CollationFrenchtest---");
  67.             logln("");
  68.  
  69.             CollationFrenchTest test;
  70.             callTest( test, par );
  71.         }
  72.         break;
  73.  
  74.     case 2:
  75.         name = "CollationGermanTest";
  76.         
  77.         if (exec)
  78.         {
  79.             logln("CollationGermantest---");
  80.             logln("");
  81.  
  82.             CollationGermanTest test;
  83.             callTest( test, par );
  84.         }
  85.         break;
  86.  
  87.     case 3:
  88.         name = "CollationDanishTest";
  89.  
  90.         if (exec)
  91.         {
  92.             logln("CollationDanishtest---");
  93.             logln("");
  94.  
  95.             CollationDanishTest test;
  96.             callTest( test, par );
  97.         }
  98.         break;
  99.  
  100.     case 4:
  101.         name = "CollationSpanishTest";
  102.         
  103.         if (exec)
  104.         {
  105.             logln("CollationSpanishtest---");
  106.             logln("");
  107.  
  108.             CollationSpanishTest test;
  109.             callTest( test, par );
  110.         }
  111.         break;
  112.  
  113.     case 5:
  114.         name = "CollationFinnishTest"; 
  115.  
  116.         if (exec)
  117.         {
  118.             logln("CollationFinnishtest---");
  119.             logln("");
  120.  
  121.             CollationFinnishTest test;
  122.             callTest( test, par );
  123.         }
  124.         break;
  125.  
  126.     case 6:
  127.         name = "CollationKanaTest"; 
  128.  
  129.         if (exec)
  130.         {
  131.             logln("CollationKanatest---");
  132.             logln("");
  133.  
  134.             CollationKanaTest test;
  135.             callTest( test, par );
  136.         }
  137.         break;
  138.  
  139.     case 7:
  140.         name = "CollationTurkishTest";
  141.         
  142.         if (exec)
  143.         {
  144.             logln("CollationTurkishtest---");
  145.             logln("");
  146.  
  147.             CollationTurkishTest test;
  148.             callTest( test, par );
  149.         }
  150.         break;
  151.  
  152.     case 8:
  153.         name = "CollationDummyTest"; 
  154.  
  155.         if (exec)
  156.         {
  157.             logln("CollationDummyTest---");
  158.             logln("");
  159.  
  160.             CollationDummyTest test;
  161.             callTest( test, par );
  162.         }
  163.         break;
  164.  
  165.     case 9:
  166.         name = "G7CollationTest";
  167.         
  168.         if (exec)
  169.         {
  170.             logln("G7CollationTest---");
  171.             logln("");
  172.  
  173.             G7CollationTest test;
  174.             callTest( test, par );
  175.         }
  176.         break;
  177.  
  178.     case 10:
  179.         name = "CollationMonkeyTest";
  180.         
  181.         if (exec)
  182.         {
  183.             logln("CollationMonkeyTest---");
  184.             logln("");
  185.  
  186.             CollationMonkeyTest test;
  187.             callTest( test, par );
  188.         }
  189.         break;
  190.  
  191.     case 11:
  192.         name = "CollationAPITest";
  193.         
  194.         if (exec)
  195.         {
  196.             logln("CollationAPITest---");
  197.             logln("");
  198.  
  199.             CollationAPITest test;
  200.             callTest( test, par );
  201.         }
  202.         break;
  203.  
  204.     case 12:
  205.         name = "CollationRegressionTest"; 
  206.  
  207.         if (exec)
  208.         {
  209.             logln("CollationRegressionTest---");
  210.             logln("");
  211.  
  212.             CollationRegressionTest test;
  213.             callTest( test, par );
  214.         }
  215.         break;
  216.  
  217.     case 13:
  218.         name = "CollationCurrencyTest"; 
  219.  
  220.         if (exec)
  221.         {
  222.             logln("CollationCurrencyTest---");
  223.             logln("");
  224.  
  225.             CollationCurrencyTest test;
  226.             callTest( test, par );
  227.         }
  228.         break;
  229.  
  230.     case 14:
  231.         name = "CollationIteratorTest"; 
  232.  
  233.         if (exec)
  234.         {
  235.             logln("CollationIteratorTest---");
  236.             logln("");
  237.  
  238.             CollationIteratorTest test;
  239.             callTest( test, par );
  240.         }
  241.         break;
  242.  
  243.     case 15: 
  244.       /*        name = "CollationCAPITest"; 
  245.         if (exec) {
  246.             logln("Collation C API test---"); logln("");
  247.             CollationCAPITest test;
  248.             callTest( test, par );
  249.         }
  250.         break;
  251.  
  252.     case 16: */
  253.         name = "BasicNormalizerTest"; 
  254.         if (exec) {
  255.             logln("BasicNormalizerTest---"); logln("");
  256.             BasicNormalizerTest test;
  257.             callTest( test, par );
  258.         }
  259.         break;
  260.  
  261.     default: name = ""; break;
  262.     }
  263. }
  264.  
  265.