NS_ASSERTION(value->Equals(*localeName)==PR_TRUE,"nsLocaleTest: factory_new_interface failed");
factory_new_locale(void){	nsresult			result;	nsILocaleFactory*	localeFactory;	nsILocale*			locale;	nsString*			localeName, *category, *value;	int	i;	nsString**			categoryList, **valueList;  const PRUnichar *lc_name_unichar;	result = nsComponentManager::FindFactory(kLocaleFactoryCID,										(nsIFactory**)&localeFactory);	NS_ASSERTION(localeFactory!=NULL,"nsLocaleTest: factory_create_interface failed.");	NS_ASSERTION(result==NS_OK,"nsLocaleTest: factory_create_interface failed");	//	// test NewLocale	//	localeName = new nsString("ja-JP");	result = localeFactory->NewLocale(localeName,&locale);	NS_ASSERTION(result==NS_OK,"nsLocaleTest: factory_new_interface failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_new_interface failed");	for(i=0;i<6;i++)	{		category = new nsString(localeCategoryList[i]);		value = new nsString();		result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);		NS_ASSERTION(result==NS_OK,"nsLocaleTest: factory_new_interface failed");		NS_ASSERTION(value->Equals(*localeName)==PR_TRUE,"nsLocaleTest: factory_new_interface failed");	    value->SetString(lc_name_unichar);		delete category;		delete value;	}	delete localeName;	locale->Release();	categoryList = new nsString*[6];	valueList = new nsString*[6];	for(i=0;i<6;i++)	{		categoryList[i] = new nsString(localeCategoryList[i]);		valueList[i] = new nsString("x-netscape");	}	result = localeFactory->NewLocale(categoryList,valueList,6,&locale);	NS_ASSERTION(result==NS_OK,"nsLocaleTest: factory_new_interface failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_new_interface failed");	for(i=0;i<6;i++)	{		value = new nsString();		result = locale->GetCategory(categoryList[i]->GetUnicode(),&lc_name_unichar);		NS_ASSERTION(result==NS_OK,"nsLocaleTest: factory_new_interface failed");		NS_ASSERTION(value->Equals(*(valueList[i]))==PR_TRUE,"nsLocaleTest: factory_new_interface failed");    value->SetString(lc_name_unichar);		delete value;	}	for(i=0;i<6;i++)	{		delete categoryList[i];		delete valueList[i];	}	delete [] categoryList;	delete [] valueList;	locale->Release();	localeFactory->Release();}