Better way of fixing previous TestTArray bustage that allows testing nsAutoTArray even for non-debug builds.

git-svn-id: svn://10.0.0.236/trunk@214640 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cvshook%sicking.cc 2006-11-02 22:42:34 +00:00
parent 3039d2cfb1
commit 727f17bcf0
2 changed files with 1 additions and 7 deletions

View File

@ -78,7 +78,7 @@ class NS_COM_GLUE nsTArray_base {
return mHdr->mCapacity;
}
#ifdef DEBUG
#if defined(DEBUG) || defined(ENABLE_TESTS)
void* DebugGetHeader() {
return mHdr;
}

View File

@ -410,9 +410,6 @@ static PRBool test_ptrarray() {
//----
// This test relies too heavily on the existance of DebugGetHeader to be
// useful in non-debug builds.
#ifdef DEBUG
static PRBool test_autoarray() {
PRUint32 data[] = {4,6,8,2,4,1,5,7,3};
nsAutoTArray<PRUint32, NS_ARRAY_LENGTH(data)> array;
@ -476,7 +473,6 @@ static PRBool test_autoarray() {
return PR_TRUE;
}
#endif
//----
@ -496,9 +492,7 @@ static const struct Test {
DECL_TEST(test_comptr_array),
DECL_TEST(test_refptr_array),
DECL_TEST(test_ptrarray),
#ifdef DEBUG
DECL_TEST(test_autoarray),
#endif
{ nsnull, nsnull }
};