October 01, 2003
URL Canonicalization Testing
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