FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
October 01, 2003

URL Canonicalization Testing

(Page 11 of 16)
URL Canonicalization Testing

Listing 9 Generating and using the test cases


#import "CommonTestCases.dll" rename_namespace("TestCases")

void UseEncodings()
    {
    TestCases::IFactoryPtr factory;
    factory.CreateInstance("CommonTestCases.Factory");
    if (NULL == factory)
        {
        return;
        }

    TestCases::IUrlCanonicalizationTestCasesPtr testCases(
        factory->UrlCanonicalizationTestValues());
    if (NULL == factory)
        {
        return;
        }

    testCases->EncodeUrl(L"http://www.windevnet.com/wdn/current", 3
        , VARIANT_FALSE, 1, 1, TestCases::EncodingUtf8);
    for (unsigned long currentUrl = 1; currentUrl <= testCases->Count; 
		++currentUrl)
        {
        // do something with testCases->Item[currentUrl].bstrVal;
        }

    return true;
    }

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK