Test the new facilities added to |nsCOMPtr| in this checkin. r={danm, hyatt}

This commit is contained in:
scc%netscape.com 1999-11-08 11:43:07 +00:00
Родитель a85a487827
Коммит 5b7341ca13
1 изменённых файлов: 23 добавлений и 0 удалений

Просмотреть файл

@ -69,6 +69,7 @@ typedef unsigned long NS_RESULT;
nsresult CreateIFoo( void** );
nsresult CreateIBar( void** result );
void AnIFooPtrPtrContext( IFoo** );
void AnISupportsPtrPtrContext( nsISupports** );
void AVoidPtrPtrContext( void** );
void set_a_IFoo( nsCOMPtr<IFoo>* result );
nsCOMPtr<IFoo> return_a_IFoo();
@ -291,6 +292,11 @@ AVoidPtrPtrContext( void** )
{
}
void
AnISupportsPtrPtrContext( nsISupports** )
{
}
// Optimism
#define TEST_EXCEPTIONS 1
@ -612,6 +618,23 @@ main()
cout << "### End Test 24" << endl;
{
nsCOMPtr<IFoo> fooP;
AnIFooPtrPtrContext( getter_AddRefs(fooP) );
AVoidPtrPtrContext( getter_AddRefs(fooP) );
AnISupportsPtrPtrContext( getter_AddRefs(fooP) );
}
{
nsCOMPtr<nsISupports> supportsP;
AVoidPtrPtrContext( getter_AddRefs(supportsP) );
AnISupportsPtrPtrContext( getter_AddRefs(supportsP) );
}
cout << endl << "### Test 25: will a static |nsCOMPtr| |Release| before program termination?" << endl;
gFoop = do_QueryInterface(new IFoo);