From 39ea807596bf4d143bdd463b63a79bc7f25a77db Mon Sep 17 00:00:00 2001 From: "pavlov%netscape.com" Date: Sat, 25 Mar 2000 02:07:34 +0000 Subject: [PATCH] add some #if[n]def STASTANDALONE_STRING_TESTS r=scc git-svn-id: svn://10.0.0.236/trunk@64091 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/string/obsolete/nsString.h | 9 ++++++--- mozilla/string/public/nsAReadableString.h | 2 +- mozilla/xpcom/ds/bufferRoutines.h | 6 +++--- mozilla/xpcom/ds/nsAReadableString.h | 2 +- mozilla/xpcom/ds/nsCRT.cpp | 4 ++-- mozilla/xpcom/ds/nsString.h | 9 ++++++--- mozilla/xpcom/string/obsolete/nsString.h | 9 ++++++--- mozilla/xpcom/string/public/nsAReadableString.h | 2 +- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/mozilla/string/obsolete/nsString.h b/mozilla/string/obsolete/nsString.h index 9200d0fded4..678e3e46adb 100644 --- a/mozilla/string/obsolete/nsString.h +++ b/mozilla/string/obsolete/nsString.h @@ -337,9 +337,10 @@ public: /********************************************************************** string conversion methods... *********************************************************************/ - - operator char*() {return mStr;} - operator const char*() const {return (const char*)mStr;} +#ifndef STASTANDALONE_STRING_TESTS + operator char*() {return mStr;} + operator const char*() const {return (const char*)mStr;} +#endif /** * This method constructs a new nsCString that is a clone @@ -744,7 +745,9 @@ public: }; #ifdef NEW_STRING_APIS +#ifndef STASTANDALONE_STRING_TESTS NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const nsCString&); +#endif NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const char*) NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const char*, const nsCString&) #endif diff --git a/mozilla/string/public/nsAReadableString.h b/mozilla/string/public/nsAReadableString.h index bb2a6772be4..58824b3b64d 100644 --- a/mozilla/string/public/nsAReadableString.h +++ b/mozilla/string/public/nsAReadableString.h @@ -1069,7 +1069,7 @@ operator+( const basic_nsLiteralString& lhs, const basic_nsLiteralString< #if 0 -#ifdef SCC_TESTS +#ifdef STANDALONE_STRING_TESTS template basic_ostream& operator<<( basic_ostream& os, const basic_nsAReadableString& s ) diff --git a/mozilla/xpcom/ds/bufferRoutines.h b/mozilla/xpcom/ds/bufferRoutines.h index 2ca83e9de71..8ca56eff3b9 100644 --- a/mozilla/xpcom/ds/bufferRoutines.h +++ b/mozilla/xpcom/ds/bufferRoutines.h @@ -36,7 +36,7 @@ #include "nsCRT.h" -#ifndef RICKG_TESTBED +#if !defined(RICKG_TESTBED) && !defined(STANDALONE_STRING_TESTS) #include "nsUnicharUtilCIID.h" #include "nsIServiceManager.h" #include "nsICaseConversion.h" @@ -704,7 +704,7 @@ PRInt32 ConvertCase1(char* aString,PRUint32 aCount,PRBool aToUpper){ //---------------------------------------------------------------------------------------- -#ifndef RICKG_TESTBED +#if !defined(RICKG_TESTBED) && !defined(STANDALONE_STRING_TESTS) class HandleCaseConversionShutdown3 : public nsIShutdownListener { public : NS_IMETHOD OnShutdown(const nsCID& cid, nsISupports* service); @@ -759,7 +759,7 @@ PRInt32 ConvertCase2(char* aString,PRUint32 aCount,PRBool aToUpper){ PRUnichar* end = cp + aCount-1; PRInt32 result=0; -#ifndef RICKG_TESTBED +#if !defined(RICKG_TESTBED) && !defined(STANDALONE_STRING_TESTS) static CCaseConversionServiceInitializer gCaseConversionServiceInitializer; // I18N code begin diff --git a/mozilla/xpcom/ds/nsAReadableString.h b/mozilla/xpcom/ds/nsAReadableString.h index bb2a6772be4..58824b3b64d 100644 --- a/mozilla/xpcom/ds/nsAReadableString.h +++ b/mozilla/xpcom/ds/nsAReadableString.h @@ -1069,7 +1069,7 @@ operator+( const basic_nsLiteralString& lhs, const basic_nsLiteralString< #if 0 -#ifdef SCC_TESTS +#ifdef STANDALONE_STRING_TESTS template basic_ostream& operator<<( basic_ostream& os, const basic_nsAReadableString& s ) diff --git a/mozilla/xpcom/ds/nsCRT.cpp b/mozilla/xpcom/ds/nsCRT.cpp index 7c7ef219c47..e46ba493309 100644 --- a/mozilla/xpcom/ds/nsCRT.cpp +++ b/mozilla/xpcom/ds/nsCRT.cpp @@ -126,13 +126,13 @@ static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID); extern nsICaseConversion * gCaseConv; -#ifdef SCC_TESTS +#ifdef STANDALONE_STRING_TESTS static nsICaseConversion* gCaseConv; #endif static void CheckCaseConversion() { -#ifndef SCC_TESTS +#ifndef STANDALONE_STRING_TESTS if (NULL == gCaseConv) (void) nsServiceManager::GetService(kUnicharUtilCID, NS_GET_IID(nsICaseConversion), (nsISupports**) &gCaseConv); diff --git a/mozilla/xpcom/ds/nsString.h b/mozilla/xpcom/ds/nsString.h index 9200d0fded4..678e3e46adb 100644 --- a/mozilla/xpcom/ds/nsString.h +++ b/mozilla/xpcom/ds/nsString.h @@ -337,9 +337,10 @@ public: /********************************************************************** string conversion methods... *********************************************************************/ - - operator char*() {return mStr;} - operator const char*() const {return (const char*)mStr;} +#ifndef STASTANDALONE_STRING_TESTS + operator char*() {return mStr;} + operator const char*() const {return (const char*)mStr;} +#endif /** * This method constructs a new nsCString that is a clone @@ -744,7 +745,9 @@ public: }; #ifdef NEW_STRING_APIS +#ifndef STASTANDALONE_STRING_TESTS NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const nsCString&); +#endif NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const char*) NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const char*, const nsCString&) #endif diff --git a/mozilla/xpcom/string/obsolete/nsString.h b/mozilla/xpcom/string/obsolete/nsString.h index 9200d0fded4..678e3e46adb 100644 --- a/mozilla/xpcom/string/obsolete/nsString.h +++ b/mozilla/xpcom/string/obsolete/nsString.h @@ -337,9 +337,10 @@ public: /********************************************************************** string conversion methods... *********************************************************************/ - - operator char*() {return mStr;} - operator const char*() const {return (const char*)mStr;} +#ifndef STASTANDALONE_STRING_TESTS + operator char*() {return mStr;} + operator const char*() const {return (const char*)mStr;} +#endif /** * This method constructs a new nsCString that is a clone @@ -744,7 +745,9 @@ public: }; #ifdef NEW_STRING_APIS +#ifndef STASTANDALONE_STRING_TESTS NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const nsCString&); +#endif NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const nsCString&, const char*) NS_DEF_NON_TEMPLATE_STRING_COMPARISON_OPERATORS(const char*, const nsCString&) #endif diff --git a/mozilla/xpcom/string/public/nsAReadableString.h b/mozilla/xpcom/string/public/nsAReadableString.h index bb2a6772be4..58824b3b64d 100644 --- a/mozilla/xpcom/string/public/nsAReadableString.h +++ b/mozilla/xpcom/string/public/nsAReadableString.h @@ -1069,7 +1069,7 @@ operator+( const basic_nsLiteralString& lhs, const basic_nsLiteralString< #if 0 -#ifdef SCC_TESTS +#ifdef STANDALONE_STRING_TESTS template basic_ostream& operator<<( basic_ostream& os, const basic_nsAReadableString& s )