VirtualBox

Ignore:
Timestamp:
Feb 14, 2009 8:23:57 AM (16 years ago)
Author:
vboxsync
Message:

RTBase64DecodedSize testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstBase64.cpp

    r16763 r16764  
    7070    }
    7171
     72    cchOut0 = RTBase64DecodedSize(s_szEnc0, NULL);
     73    if (cchOut0 != sizeof(s_szText0) - 1)
     74    {
     75        RTPrintf("tstBase64: FAILURE - RTBase64DecodedSize returned %zu bytes, expected %zu.\n",
     76                 cchOut0, sizeof(s_szText0) - 1);
     77        cErrors++;
     78    }
     79
    7280    /*
    7381     * Test 1.
     
    93101        RTPrintf("tstBase64: FAILURE - RTBase64Decode returned:\n%.*s\nexpected:\n%s\n",
    94102                 (int)cchOut1, szOut1, s_szText1);
     103        cErrors++;
     104    }
     105
     106    cchOut1 = RTBase64DecodedSize(s_szEnc1, NULL);
     107    if (cchOut1 != sizeof(s_szText1) - 1)
     108    {
     109        RTPrintf("tstBase64: FAILURE - RTBase64DecodedSize returned %zu bytes, expected %zu.\n",
     110                 cchOut1, sizeof(s_szText1) - 1);
    95111        cErrors++;
    96112    }
     
    133149    }
    134150
     151    cchOut2 = RTBase64DecodedSize(s_szEnc2, NULL);
     152    if (cchOut2 != sizeof(s_szText2) - 1)
     153    {
     154        RTPrintf("tstBase64: FAILURE - RTBase64DecodedSize returned %zu bytes, expected %zu.\n",
     155                 cchOut2, sizeof(s_szText2) - 1);
     156        cErrors++;
     157    }
     158
    135159    /*
    136160     * Summary.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette