Bustage fix for *nix platforms.
authorKyle Huey <khuey@kylehuey.com>
Wed, 08 Jun 2011 12:50:14 -0700
changeset 70756 4e2b86b6025c899c9904e1cf8b43059a89f12a02
parent 70755 dd0a133916c7f6b9fd89bc2855ac607d9d0e1945
child 70757 31ea40628d483252166a695ed7887756924978ae
push id20406
push usereakhgari@mozilla.com
push dateWed, 08 Jun 2011 21:46:52 +0000
treeherdermozilla-central@3a509617644e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bustage fix for *nix platforms.
xpcom/tests/TestBase64.cpp
--- a/xpcom/tests/TestBase64.cpp
+++ b/xpcom/tests/TestBase64.cpp
@@ -283,22 +283,28 @@ FakeInputStream::NextTest()
 }
 
 bool
 FakeInputStream::CheckTest(nsACString& aResult)
 {
   return !strcmp(aResult.BeginReading(), mTest->mResult) ? true : false;
 }
 
+#ifdef XP_WIN
+#define NS_tstrcmp wcscmp
+#else
+#define NS_tstrcmp strcmp
+#endif
+
 bool
 FakeInputStream::CheckTest(nsAString& aResult)
 {
-  return !wcscmp(aResult.BeginReading(),
-                 NS_ConvertASCIItoUTF16(mTest->mResult).BeginReading())
-                 ? true : false;
+  return !NS_tstrcmp(aResult.BeginReading(),
+                     NS_ConvertASCIItoUTF16(mTest->mResult).BeginReading())
+                     ? true : false;
 }
 
 int main(int argc, char** argv)
 {
   ScopedXPCOM xpcom("Base64");
   NS_ENSURE_FALSE(xpcom.failed(), 1);
 
   nsCOMPtr<nsIScriptableBase64Encoder> encoder =