checks for null strings. test programs only.

This commit is contained in:
attinasi%netscape.com 2000-05-02 22:38:58 +00:00
parent 152f6f29e4
commit 950775e1ac
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;