checks for null strings. test programs only.

git-svn-id: svn://10.0.0.236/trunk@67932 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
attinasi%netscape.com 2000-05-02 22:38:58 +00:00
parent f32dd26a1b
commit e079ebd121
2 changed files with 13 additions and 1 deletions

View File

@ -73,6 +73,7 @@ void testAttributes(nsIHTMLContent* content) {
nsISupportsArray* allNames;
NS_NewISupportsArray(&allNames);
if (nsnull == allNames) return;
PRInt32 na;
content->GetAttributeCount(na);
@ -236,8 +237,13 @@ int main(int argc, char** argv)
// Create test document.
MyDocument *myDoc = new MyDocument();
if (myDoc) {
testStrings(myDoc);
} else {
printf("Out of memory trying to create document\n");
return -1;
}
testStrings(myDoc);
// Create a new text content object.
nsIContent *text;

View File

@ -75,7 +75,13 @@ int main(int argc, char** argv)
// Create scanner and set it up to process the input file
nsCSSScanner* css = new nsCSSScanner();
if (nsnull == css) {
printf("Out of memory allocating nsCSSScanner\n");
return -1;
}
css->Init(uin);
// Scan the file and dump out the tokens
nsCSSToken tok;