Make NS_LIKELY/NS_UNLIKELY accept pointers etc and always return 0 or 1. b=340244 r+sr=darin

git-svn-id: svn://10.0.0.236/trunk@215416 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2006-11-18 00:48:56 +00:00
parent f0caa7c822
commit 77dba5b664
5 changed files with 16 additions and 32 deletions

View File

@@ -90,23 +90,27 @@ nsresult TextEditorTest::RunUnitTest(PRInt32 *outNumTests, PRInt32 *outNumTestsF
result = mTextEditor->InsertText(NS_LITERAL_STRING("1234567890abcdefghij1234567890"));
TEST_RESULT(result);
(*outNumTests)++;
(*outNumTestsFailed) += (NS_FAILED(result) != NS_OK);
if (NS_FAILED(result))
++(*outNumTestsFailed);
// insert some more text
result = mTextEditor->InsertText(NS_LITERAL_STRING("Moreover, I am cognizant of the interrelatedness of all communities and states. I cannot sit idly by in Atlanta and not be concerned about what happens in Birmingham. Injustice anywhere is a threat to justice everywhere"));
TEST_RESULT(result);
(*outNumTests)++;
(*outNumTestsFailed) += (NS_FAILED(result) != NS_OK);
if (NS_FAILED(result))
++(*outNumTestsFailed);
result = TestInsertBreak();
TEST_RESULT(result);
(*outNumTests)++;
(*outNumTestsFailed) += (NS_FAILED(result) != NS_OK);
if (NS_FAILED(result))
++(*outNumTestsFailed);
result = TestTextProperties();
TEST_RESULT(result);
(*outNumTests)++;
(*outNumTestsFailed) += (NS_FAILED(result) != NS_OK);
if (NS_FAILED(result))
++(*outNumTestsFailed);
// get us back to the original document
result = mEditor->Undo(12);