Back out previous checkin, ENABLE_TESTS is not available inside code

git-svn-id: svn://10.0.0.236/trunk@214650 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cvshook%sicking.cc
2006-11-03 00:52:40 +00:00
parent da39432a29
commit 30e5ba2d08
2 changed files with 7 additions and 1 deletions

View File

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

View File

@@ -410,6 +410,9 @@ 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;
@@ -473,6 +476,7 @@ static PRBool test_autoarray() {
return PR_TRUE;
}
#endif
//----
@@ -492,7 +496,9 @@ 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 }
};