home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / cintltst / cucdtst.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-19  |  17.6 KB  |  540 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1996                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1999                    *
  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. * File CUCDTST.C
  15. *
  16. * Modification History:
  17. *        Name                     Description            
  18. *     Madhu Katragadda            Ported for C API, added tests for string functions
  19. *********************************************************************************
  20. */
  21. #include "uchar.h"
  22. #include "utypes.h"
  23. #include "cintltst.h"
  24. #include "cucdtst.h"
  25. #include "utypes.h"
  26. #include "ustring.h"
  27. #include "uloc.h"
  28.  
  29. #include <stdio.h>
  30. #include<string.h>
  31. UChar*** dataTable = 0;
  32. const UChar  LAST_CHAR_CODE_IN_FILE = 0xFFFD;
  33. const char tagStrings[] = "MnMcMeNdNlNoZsZlZpCcCfCsCoCnLuLlLtLmLoPcPdPsPePoSmScSkSoPiPf";
  34. const int32_t tagValues[] =
  35.     {
  36.     /* Mn */ U_NON_SPACING_MARK,
  37.     /* Mc */ U_COMBINING_SPACING_MARK,
  38.     /* Me */ U_ENCLOSING_MARK,
  39.     /* Nd */ U_DECIMAL_DIGIT_NUMBER,
  40.     /* Nl */ U_LETTER_NUMBER,
  41.     /* No */ U_OTHER_NUMBER,
  42.     /* Zs */ U_SPACE_SEPARATOR,
  43.     /* Zl */ U_LINE_SEPARATOR,
  44.     /* Zp */ U_PARAGRAPH_SEPARATOR,
  45.     /* Cc */ U_CONTROL_CHAR,
  46.     /* Cf */ U_FORMAT_CHAR,
  47.     /* Cs */ U_SURROGATE,
  48.     /* Co */ U_PRIVATE_USE_CHAR,
  49.     /* Cn */ U_UNASSIGNED,
  50.     /* Lu */ U_UPPERCASE_LETTER,
  51.     /* Ll */ U_LOWERCASE_LETTER,
  52.     /* Lt */ U_TITLECASE_LETTER,
  53.     /* Lm */ U_MODIFIER_LETTER,
  54.     /* Lo */ U_OTHER_LETTER,
  55.     /* Pc */ U_CONNECTOR_PUNCTUATION,
  56.     /* Pd */ U_DASH_PUNCTUATION,
  57.     /* Ps */ U_START_PUNCTUATION,
  58.     /* Pe */ U_END_PUNCTUATION,
  59.     /* Po */ U_OTHER_PUNCTUATION,
  60.     /* Sm */ U_MATH_SYMBOL,
  61.     /* Sc */ U_CURRENCY_SYMBOL,
  62.     /* Sk */ U_MODIFIER_SYMBOL,
  63.     /* So */ U_OTHER_SYMBOL,
  64.     /* Pi */ U_INITIAL_PUNCTUATION,
  65.     /* Pf */ U_FINAL_PUNCTUATION
  66.     };
  67. const char dirStrings[][5] = {
  68.     "L",
  69.     "R",
  70.     "EN",
  71.     "ES",
  72.     "ET",   
  73.     "AN",
  74.     "CS",
  75.     "B",
  76.     "S",
  77.     "WS",
  78.     "ON",
  79.     "LRE",
  80.     "LRO",
  81.     "AL",
  82.     "RLE",
  83.     "RLO",
  84.     "PDF",
  85.     "NSM",
  86.     "BN"
  87. };
  88.  
  89.  
  90. void addUnicodeTest(TestNode** root)
  91. {
  92.     setUpDataTable();
  93.     
  94.     addTest(root, &TestUpperLower, "tsutil/cucdtst/TestUpperLower");
  95.     addTest(root, &TestLetterNumber, "tsutil/cucdtst/TestLetterNumber");
  96.     addTest(root, &TestMisc, "tsutil/cucdtst/TestMisc");
  97.     addTest(root, &TestControlPrint, "tsutil/cucdtst/TestControlPrint");
  98.     addTest(root, &TestIdentifier, "tsutil/cucdtst/TestIdentifier");
  99.     addTest(root, &TestUnicodeData, "tsutil/cucdtst/TestUnicodeData");
  100.     addTest(root, &TestStringFunctions, "tsutil/cucdtst/TestStringFunctions");
  101.  
  102. }
  103. /*==================================================== */
  104. /* test u_toupper() and u_tolower()                    */
  105. /*==================================================== */
  106. void TestUpperLower()
  107. {
  108.     static char* upperTest = "abcdefg123hij.?:klmno";
  109.     static char* lowerTest = "ABCDEFG123HIJ.?:KLMNO";
  110.     int i;
  111.     log_verbose("testing upper lower\n");
  112.     for (i = 0; i < 21; i++) {
  113.         
  114.         log_verbose("testing to upper to lower\n");
  115.         if (u_isalpha(upperTest[i]) && !u_islower(upperTest[i]))
  116.         {
  117.             log_err("Failed isLowerCase test at  %c\n", upperTest[i]);
  118.         }  
  119.         else if (u_isalpha(lowerTest[i]) && !u_isupper(lowerTest[i]))
  120.          {
  121.             log_err("Failed isUpperCase test at %c\n", lowerTest[i]);
  122.         }  
  123.         else if (upperTest[i] != u_tolower(lowerTest[i]))
  124.         {
  125.             log_err("Failed case conversion from %c  To %c :\n", lowerTest[i], upperTest[i]);
  126.             
  127.         }
  128.         else if (lowerTest[i] != u_toupper(upperTest[i]))
  129.          {
  130.             log_err("Failed case conversion : %c To %c \n", upperTest[i], lowerTest[i]);
  131.         }
  132.         else if (upperTest[i] != u_tolower(upperTest[i]))
  133.         {
  134.             log_err("Failed case conversion with itself: %c\n", upperTest[i]);
  135.         }
  136.         else if (lowerTest[i] != u_toupper(lowerTest[i]))
  137.         {   
  138.             log_err("Failed case conversion with itself: %c\n", lowerTest[i]);
  139.         }
  140.     }
  141.     log_verbose("done testing upper Lower\n");
  142. }
  143.  
  144.  
  145. /* test isLetter(u_isapha()) and isDigit(u_isdigit()) */
  146. void TestLetterNumber()
  147. {
  148.     UChar i = 0x0000;
  149.  
  150.     for (i = 0x0041; i < 0x005B; i++) {
  151.         log_verbose("Testing for isalpha\n");    
  152.         if (!u_isalpha(i))
  153.         {
  154.             log_err("Failed isLetter test at  %.4X\n", i);
  155.             
  156.         }
  157.     }
  158.     for (i = 0x0660; i < 0x066A; i++) {
  159.         log_verbose("Testing for isalpha\n"); 
  160.         if (u_isalpha(i))
  161.         {
  162.             log_err("Failed isLetter test with numbers at %.4X\n", i);
  163.             
  164.         }
  165.     }
  166.     for (i = 0x0660; i < 0x066A; i++) {
  167.         log_verbose("Testing for isdigit\n");
  168.         if (!u_isdigit(i))
  169.         {
  170.             log_verbose("Failed isNumber test at %.4X\n", i);
  171.         }
  172.     }
  173. }
  174.  
  175. /* Tests for isDefined(u_isdefined)(, isBaseForm(u_isbase()), isSpaceChar(u_isspace()),u_CharDigitValue(),u_CharCellWidth() */
  176. void TestMisc()
  177. {
  178.     const UChar sampleSpaces[] = {0x0020, 0x00a0, 0x2000, 0x2001, 0x2005};
  179.     const UChar sampleNonSpaces[] = {'a', 'b', 'c', 'd', 't'};
  180.     const UChar sampleUndefined[] = {0xfff1, 0xfff7, 0xfa30};
  181.     const UChar sampleDefined[] = {0x523E, 0x4f88, 0xfffd};
  182.     const UChar sampleBase[] = {0x0061, 0x0031, 0x03d2};
  183.     const UChar sampleNonBase[] = {0x002B, 0x0020, 0x203B};
  184.     const UChar sampleChars[] = {0x000a, 0x0045, 0x4e00, 0xDC00};
  185.     const UChar sampleDigits[]= {0x0030, 0x0662, 0x0F23, 0x0ED5};
  186.     const UChar sampleNonDigits[] = {0x0010, 0x0041, 0x0122, 0x68FE};
  187.     const int32_t sampleDigitValues[] = {0, 2, 3, 5};
  188.  
  189.     enum ECellWidths         /* pasted in here from unicode.h */
  190.     {
  191.         ZERO_WIDTH              = 0,
  192.         HALF_WIDTH              = 1,
  193.         FULL_WIDTH              = 2,
  194.         NEUTRAL                 = 3
  195.     };
  196.  
  197.     const uint16_t sampleCellWidth[] = { ZERO_WIDTH, 
  198.                                          HALF_WIDTH, 
  199.                                          FULL_WIDTH, 
  200.                                          NEUTRAL};
  201.     int i;
  202.     for (i = 0; i < 5; i++) {
  203.       log_verbose("Testing for isspace and nonspaces\n");
  204.         if (!(u_isspace(sampleSpaces[i])) ||
  205.                 (u_isspace(sampleNonSpaces[i])))
  206.         {
  207.             log_err("Space char test error : %d or %d \n", (int32_t)sampleSpaces[i], (int32_t)sampleNonSpaces[i]);
  208.         }
  209.     }
  210.     for (i = 0; i < 3; i++) {
  211.       log_verbose("Testing for isdefined\n");
  212.         if ((u_isdefined(sampleUndefined[i])) ||
  213.                 !(u_isdefined(sampleDefined[i])))
  214.         {
  215.             log_err("Undefined char test error : %d  or  %d\n", (int32_t)sampleUndefined[i], (int32_t)sampleDefined[i]);
  216.         }
  217.     }
  218.     for (i = 0; i < 3; i++) {
  219.       log_verbose("Testing for isbase\n");
  220.         if ((u_isbase(sampleNonBase[i])) ||
  221.                 !(u_isbase(sampleBase[i])))
  222.         {
  223.             log_err("Non-baseform char test error : %d or %d",(int32_t)sampleNonBase[i], (int32_t)sampleBase[i]);
  224.         }
  225.     }
  226.     for (i = 0; i < 4; i++) {
  227.       log_verbose("Testing for charcellwidth\n");
  228.         if (u_charCellWidth(sampleChars[i]) != sampleCellWidth[i])
  229.         {
  230.             log_err("Cell width char test error : %d  \n", (int32_t)sampleChars[i]);
  231.         }
  232.     }
  233.     for (i = 0; i < 4; i++) {
  234.        log_verbose("Testing for isdigit\n"); 
  235.         if ((u_isdigit(sampleDigits[i]) && 
  236.             (u_charDigitValue(sampleDigits[i])!= sampleDigitValues[i])) ||
  237.             (u_isdigit(sampleNonDigits[i]))) {
  238.             log_err("Digit char test error : %d   or   %d\n", (int32_t)sampleDigits[i], (int32_t)sampleNonDigits[i]);
  239.         }
  240.     }
  241. }
  242.  
  243.  
  244. /* Tests for isControl(u_iscntrl()) and isPrintable(u_isprint()) */
  245. void TestControlPrint()
  246. {
  247.     const UChar sampleControl[] = {0x001b, 0x0097, 0x0082};
  248.     const UChar sampleNonControl[] = {'a', 0x0031, 0x00e2};
  249.     const UChar samplePrintable[] = {0x0042, 0x005f, 0x2014};
  250.     const UChar sampleNonPrintable[] = {0x200c, 0x009f, 0x001c};
  251.     int i;
  252.     for (i = 0; i < 3; i++) {
  253.         log_verbose("Testing for iscontrol\n");
  254.         if (!(u_iscntrl(sampleControl[i])) ||
  255.                 (u_iscntrl(sampleNonControl[i])))
  256.         {
  257.             log_err("Control char test error : %d   or  %d\n", (int32_t)sampleControl[i], (int32_t)sampleNonControl[i]);
  258.         }
  259.     }
  260.     for (i = 0; i < 3; i++) {
  261.         log_verbose("testing for isprintable\n");
  262.         if ((u_isprint(sampleNonPrintable[i])) ||
  263.                 !(u_isprint(samplePrintable[i])))
  264.         {
  265.             log_err("Printable char test error : %d  or  %d\n", (int32_t)samplePrintable[i], (int32_t)sampleNonPrintable[i]);
  266.         }
  267.     }
  268. }
  269. /* u_isIDStart(), u_isIDPart(), u_isIDIgnorable()*/
  270. void TestIdentifier()
  271. {
  272.     
  273.  
  274.     const UChar sampleUnicodeIDStart[] = {0x0250, 0x00e2, 0x0061};
  275.     const UChar sampleNonUnicodeIDStart[] = {0x2000, 0x000a, 0x2019};
  276.     const UChar sampleUnicodeIDPart[] = {0x005f, 0x0032, 0x0045};
  277.     const UChar sampleNonUnicodeIDPart[] = {0x007f, 0x00a3, 0x0020};
  278.     const UChar sampleIDIgnore[] = {0x0006, 0x0010, 0x206b};
  279.     const UChar sampleNonIDIgnore[] = {0x0075, 0x00a3, 0x0061};
  280.  
  281.     int i;
  282.     for (i = 0; i < 3; i++) {
  283.         log_verbose("Testing sampleUnicodeID start \n");
  284.         /* T_test_logln_ustr((int32_t)i); */
  285.         if (!(u_isIDStart(sampleUnicodeIDStart[i])) ||
  286.                 (u_isIDStart(sampleNonUnicodeIDStart[i])))
  287.         {
  288.             log_err("Unicode ID Start char test error : %d  or  %d\n", (int32_t)sampleUnicodeIDStart[i],
  289.                                     (int32_t)sampleNonUnicodeIDStart[i]);
  290.         }
  291.     }
  292.     for (i = 2; i < 3; i++) {   /* nos *** starts with 2 instead of 0, until clarified */
  293.         log_verbose("Testing sample unicode ID part \n");
  294.         /* T_test_logln_ustr((int32_t)i); */
  295.         if (!(u_isIDPart(sampleUnicodeIDPart[i])) ||
  296.                 (u_isIDPart(sampleNonUnicodeIDPart[i])))
  297.            {
  298.             log_err("Unicode ID Part char test error : %d  or  %d", (int32_t)sampleUnicodeIDPart[i], (int32_t)sampleNonUnicodeIDPart[i]);
  299.             }
  300.     }
  301.     for (i = 0; i < 3; i++) {
  302.         log_verbose("Testing  sampleId ignore\n");
  303.         /*T_test_logln_ustr((int32_t)i); */
  304.         if (!(u_isIDIgnorable(sampleIDIgnore[i])) ||
  305.                 (u_isIDIgnorable(sampleNonIDIgnore[i])))
  306.         {
  307.             log_verbose("ID ignorable char test error : %d  or  %d\n", (int32_t)sampleIDIgnore[i], (int32_t)sampleNonIDIgnore[i]);
  308.         }
  309.     }
  310. }
  311.  
  312. /* tests for u_CharType(), u_isTitle(), and u_toTitle(),u_charDirection and u_charScript()*/
  313. void TestUnicodeData()
  314. {
  315.     FILE*   input = 0;
  316.     char    buffer[1000];
  317.     char*   bufferPtr = 0, *dirPtr = 0;
  318.     int32_t unicode;
  319.     char newPath[256];
  320.  
  321.     strcpy(newPath,icu_getDefaultDataDirectory());
  322.     strcat(newPath, "UnicodeData-3.0.0.txt");
  323.     
  324.     input = fopen(newPath, "r");
  325.  
  326.     if (input == 0) {
  327.       log_err("Unicode C API test 'fopen' (%s) error\n", newPath);
  328.       return;
  329.     }
  330.  
  331.         
  332.         for(;;) {
  333.             bufferPtr = fgets(buffer, 999, input);
  334.             if (bufferPtr == NULL) break;
  335.             if (bufferPtr[0] == '#' || bufferPtr[0] == '\n' || bufferPtr[0] == 0) continue;
  336.             sscanf(bufferPtr, "%X", &unicode);
  337.             if (!(0 <= unicode && unicode < 65536)) {
  338.                 log_err("Unicode C API test precondition '(0 <= unicode && unicode < 65536)' failed\n");
  339.                 return;
  340.             }
  341.             if (unicode == LAST_CHAR_CODE_IN_FILE)
  342.                 break;
  343.             bufferPtr = strchr(bufferPtr, ';');
  344.             if (!(bufferPtr != NULL)) {
  345.                 log_err("Unicode C API test condition '(bufferPtr != NULL)' failed\n");
  346.                 return;
  347.             }
  348.             bufferPtr = strchr(bufferPtr + 1, ';'); /* go to start of third field */
  349.             if (!(bufferPtr != NULL)) {
  350.                 log_err("Unicode C API test condition '(bufferPtr != NULL)' failed\n");
  351.                 return;
  352.             }
  353.             dirPtr = bufferPtr;
  354.             dirPtr = strchr(dirPtr + 1, ';');
  355.             if (!(dirPtr != NULL)) {
  356.                 log_err("Unicode C API test precondition '(dirPtr != NULL)' failed\n");
  357.                 return;
  358.             }
  359.             dirPtr = strchr(dirPtr + 1, ';');
  360.             if (!(dirPtr != NULL)) {
  361.                 log_err("Unicode C API test precondition '(dirPtr != NULL)' failed\n");
  362.                 return;
  363.             }
  364.             bufferPtr++;
  365.             bufferPtr[2] = 0;
  366.             
  367.             if (u_charType((UChar)unicode) != tagValues[MakeProp(bufferPtr)])
  368.             {
  369.                 log_err("Unicode character type failed at %d\n",unicode);
  370.             }
  371.             /* test title case */
  372.             if ((u_totitle((UChar)unicode) != u_toupper((UChar)unicode)) &&
  373.                 !(u_istitle(u_totitle((UChar)unicode))))
  374.             {
  375.                 log_err("Title case test failed at %d \n", unicode);
  376.             }
  377.             bufferPtr = strchr(dirPtr + 1, ';');
  378.             dirPtr++;
  379.             bufferPtr[0] = 0;
  380.             if (u_charDirection((UChar)unicode) != MakeDir(dirPtr)) 
  381.             {
  382.                 log_err("Unicode character directionality failed at %d\n", unicode);
  383.                 
  384.             }
  385.         }
  386.  
  387.         if (u_charScript((UChar)0x0041 != U_BASIC_LATIN)) {
  388.             log_err("Unicode character script property failed !\n");
  389.         }
  390.         if (input) 
  391.             fclose(input);
  392.  
  393.  
  394. }
  395. /*internal functions ----*/
  396. int32_t MakeProp(char* str) 
  397. {
  398.     int32_t result = 0;
  399.     char* matchPosition =0;
  400.     
  401.     matchPosition = strstr(tagStrings, str);
  402.     if (matchPosition == 0) 
  403.     {
  404.         log_err("unrecognized type letter ");
  405.         log_err(str);
  406.     }
  407.     else result = ((matchPosition - tagStrings) / 2);
  408.     return result;
  409. }
  410.  
  411. int32_t MakeDir(char* str) 
  412. {
  413.     int32_t pos = 0;
  414.     for (pos = 0; pos < 19; pos++) {
  415.         if (strcmp(str, dirStrings[pos]) == 0) {
  416.             return pos;
  417.         }
  418.     }
  419.     return -1;
  420. }
  421. /*----------------*/
  422.  
  423.  
  424. static  char* raw[3][4] = {
  425.    
  426.     /* First String */
  427.     {   "English_",  "French_",   "Croatian_", "English_"},
  428.     /* Second String */
  429.     {   "United States",    "France",   "Croatia",  "Unites States"},
  430.    
  431.    /* Concatenated string */
  432.     {   "English_United States", "French_France", "Croatian_Croatia", "English_United States"}
  433. };
  434.    
  435. void setUpDataTable()
  436. {
  437.     int32_t i,j;
  438.     dataTable = calloc(sizeof(UChar**),3);
  439.  
  440.         for (i = 0; i < 3; i++) {
  441.           dataTable[i] = calloc(sizeof(UChar*),4);
  442.             for (j = 0; j < 4; j++){
  443.                 dataTable[i][j] = (UChar*) malloc(sizeof(UChar)*(strlen(raw[i][j])+1));
  444.                 u_uastrcpy(dataTable[i][j],raw[i][j]);
  445.             }
  446.         }
  447.     
  448. }
  449. /*Tests  for u_strcat(),u_strcmp(), u_strlen(), u_strcpy(),u_strncat(),u_strncmp(),u_strncpy, u_uastrcpy(),u_austrcpy(); */
  450. void TestStringFunctions()
  451. {
  452.    
  453.     int32_t i,j,k;
  454.     UChar* temp =0;
  455.     char test[20];
  456.     log_verbose("Testing u_strlen()\n");
  457.     if( u_strlen(dataTable[0][0])!= u_strlen(dataTable[0][3]) || u_strlen(dataTable[0][0]) == u_strlen(dataTable[0][2]))
  458.         log_err("There is an error in u_strlen()");
  459.  
  460.     log_verbose("Testing u_strcpy() and u_strcmp)\n");
  461.     temp=(UChar*)malloc(sizeof(UChar*) * 1);
  462.     
  463.     for(i=0;i<3;++i){
  464.         for(j=0;j<4;++j)
  465.         {
  466.         log_verbose("Testing  %s  \n", austrdup(dataTable[i][j]));
  467.         temp=(UChar*)realloc(temp, sizeof(UChar)*(u_strlen(dataTable[i][j]) + 1));
  468.         u_strcpy(temp,dataTable[i][j]);
  469.         
  470.         if(u_strcmp(temp,dataTable[i][j])!=0)
  471.         log_err("something threw an error in u_strcpy() or u_strcmp()\n");
  472.         }
  473.     }
  474.     
  475.     log_verbose("testing u_strcat()\n");
  476.     i=0;
  477.     for(j=0; j<2;++j)
  478.     {
  479.         temp=(UChar*)realloc(temp, sizeof(UChar)*(u_strlen(dataTable[i+2][j]) +1));
  480.         u_strcpy(temp,dataTable[i][j]);
  481.         u_strcat(temp,dataTable[i+1][j]);
  482.         if(u_strcmp(temp,dataTable[i+2][j])!=0)
  483.             log_err("something threw an error in u_strcat()\n");
  484.     
  485.     }
  486.     log_verbose("Testing u_strncmp()\n");
  487.     for(i=0,j=0;j<4; ++j)
  488.     {
  489.         k=u_strlen(dataTable[i][j]);
  490.         if(u_strncmp(dataTable[i][j],dataTable[i+2][j],k)!=0)
  491.             log_err("Something threw an error in u_strncmp\n");
  492.     }
  493.     
  494.     
  495.     log_verbose("Testing u_strncat \n");
  496.     for(i=0,j=0;j<4; ++j)
  497.     {    
  498.         k=u_strlen(dataTable[i][j]);
  499.         
  500.         u_uastrcpy(temp,"");
  501.         
  502.         if(u_strcmp(u_strncat(temp,dataTable[i+2][j],k),dataTable[i][j])!=0)
  503.             log_err("something threw an error in u_strncat or u_uastrcpy()\n");
  504.         
  505.     }
  506.  
  507.     log_verbose("Testing u_strncpy()\n");
  508.     for(i=0,j=0;j<4; ++j)
  509.     {
  510.         k=u_strlen(dataTable[i][j]);
  511.         u_uastrcpy(temp,"");
  512.         u_strncpy(temp,dataTable[i+2][j],k);
  513.         
  514.         if(u_strcmp(temp,dataTable[i][j])!=0)
  515.             log_err("something threw an error in u_strncpy()\n");
  516.     }
  517.     
  518.     log_verbose("Testing if u_strchr() works fine\n");
  519.     
  520.     for(i=2,j=0;j<4;j++)
  521.     {
  522.         
  523.         log_verbose("%s ", austrdup(u_strchr(dataTable[i][j],'_')));
  524.     }
  525.  
  526.  
  527.     log_verbose("Testing u_austrcpy()");
  528.     u_austrcpy(test,dataTable[0][0]);
  529.     if(strcmp(test,raw[0][0])!=0)
  530.         log_err("There is an error in u_austrcpy()");
  531.  
  532.   
  533.     
  534. }
  535.  
  536.  
  537.  
  538.  
  539.      
  540.