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:
parent
3039d2cfb1
commit
727f17bcf0
@ -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;
|
||||
}
|
||||
|
||||
@ -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 }
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user