IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2006, 1:55:53 PM (20 years ago)
Author:
Paul Price
Message:

Fixing psStringSplit following code update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sys/tst_psString.c

    r6989 r7045  
    2020 *  @author  Eric Van Alst, MHPCC
    2121 *
    22  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    23  *  @date  $Date: 2006-04-26 02:19:23 $
     22 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     23 *  @date  $Date: 2006-05-02 23:55:53 $
    2424 *
    2525 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    455455    //Return NULL for NULL inputs
    456456    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    457     strList = psStringSplit(NULL, NULL);
     457    strList = psStringSplit(NULL, NULL, true);
    458458    //    if (strList != NULL) {
    459     if ( psListLength(strList) ) {
     459    if (strList) {
    460460        psFree(strList);
    461461        return 1;
     
    465465    //Return NULL for NULL string input
    466466    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    467     strList = psStringSplit(NULL, split);
     467    strList = psStringSplit(NULL, split, true);
    468468    //    if (strList != NULL) {
    469469    if ( psListLength(strList) ) {
     
    475475    //Return NULL for NULL splitter input
    476476    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    477     strList = psStringSplit(str, NULL);
     477    strList = psStringSplit(str, NULL, true);
    478478    //    if (strList != NULL) {
    479     if ( psListLength(strList) ) {
     479    if ( strList ) {
    480480        psFree(strList);
    481481        return 3;
     
    484484    strList = NULL;
    485485    //Return a psList* of psStrings
    486     strList = psStringSplit(str, split);
     486    strList = psStringSplit(str, split, true);
    487487    if (strList->n != 4) {
    488488        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    512512    psFree(strList);
    513513    //Return correct psList when using (psString, char*)
    514     strList = psStringSplit(psStr, split);
     514    strList = psStringSplit(psStr, split, true);
    515515    if (strList->n != 4) {
    516516        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    540540    psFree(strList);
    541541    //Return correct psList when using (char*, psString)
    542     strList = psStringSplit(str, psSplit);
     542    strList = psStringSplit(str, psSplit, true);
    543543    if (strList->n != 4) {
    544544        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    568568    psFree(strList);
    569569    //Return correct psList when using (psString, psString)
    570     strList = psStringSplit(psStr, psSplit);
     570    strList = psStringSplit(psStr, psSplit, true);
    571571    if (strList->n != 4) {
    572572        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    597597    //Return correct psList output for string of zero length case
    598598    strncpy(str, "This is,, a,, test case,, to check.", 35);
    599     strList = psStringSplit(str, split);
     599    strList = psStringSplit(str, split, false);
    600600    if (strList->n != 4) {
    601601        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    687687    psList *nullList = NULL;
    688688    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    689     nullList = psStringSplit(nullTest, ",");
     689    nullList = psStringSplit(nullTest, ",", true);
    690690    //    if (nullList != NULL) {
    691691    if ( psListLength(nullList) ) {
     
    698698    //psStringSplit should return NULL for NULL input splitter
    699699    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
    700     nullList = psStringSplit("Hello World", nullTest);
     700    nullList = psStringSplit("Hello World", nullTest, true);
    701701    //    if (nullList != NULL) {
    702     if ( psListLength(nullList) ) {
     702    if ( nullList ) {
    703703        psError(PS_ERR_BAD_PARAMETER_NULL, false,
    704704                "psStringSplit failed to return NULL for NULL input splitter.\n");
Note: See TracChangeset for help on using the changeset viewer.