[mapguide-commits] r1178 - trunk/MgDev/Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Mar 8 07:27:21 EST 2007


Author: waltweltonlair
Date: 2007-03-08 07:27:21 -0500 (Thu, 08 Mar 2007)
New Revision: 1178

Modified:
   trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
   trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp
Log:
Fix a few Linux build warnings.


Modified: trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2007-03-08 12:10:40 UTC (rev 1177)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp	2007-03-08 12:27:21 UTC (rev 1178)
@@ -1,5 +1,5 @@
 //
-//  Copyright (C) 2004-2006  Autodesk, Inc.
+//  Copyright (C) 2007 by Autodesk, Inc.
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of version 2.1 of the GNU Lesser
@@ -81,12 +81,12 @@
         Ptr<MgUserInformation> userInfo = new MgUserInformation(L"Administrator", L"admin");
         userInfo->SetLocale(TEST_LOCALE);
         MgUserInformation::SetCurrentUserInfo(userInfo);
-        
+
         //create a session
         STRING session = m_svcSite->CreateSession();
         CPPUNIT_ASSERT(!session.empty());
         userInfo->SetMgSessionId(session);
-        
+
         //publish the map definition
         Ptr<MgResourceIdentifier> mapres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
         Ptr<MgByteSource> mdfsrc = new MgByteSource(L"../UnitTestFiles/UT_Sheboygan.mdf", false);
@@ -229,7 +229,7 @@
 
         STRING mimeType = reader->GetMimeType();
         CPPUNIT_ASSERT(mimeType.compare(MgMimeType::Kml) == 0);
-        
+
         //compare results against referenced content
         CPPUNIT_ASSERT(CompareContent(reader, L"../UnitTestFiles/UT_GetMapKMLResult.txt"));
     }
@@ -245,6 +245,7 @@
     }
 }
 
+
 void TestKmlService::TestCase_GetMapKmz()
 {
     try
@@ -277,6 +278,7 @@
     }
 }
 
+
 void TestKmlService::TestCase_GetLayerKml()
 {
     try
@@ -315,6 +317,7 @@
     }
 }
 
+
 void TestKmlService::TestCase_GetFeaturesKml()
 {
     try
@@ -352,10 +355,11 @@
     }
 }
 
+
 STRING TestKmlService::RemoveSessionIds(CREFSTRING content)
 {
     STRING newContent = content;
-    
+
     STRING sessionId;
     MgUserInformation* userInfo = MgUserInformation::GetCurrentUserInfo();
     if (userInfo != NULL)
@@ -365,7 +369,7 @@
 
     if(!sessionId.empty())
     {
-        STRING dummyId = L"SessionIDRemoved"; 
+        STRING dummyId = L"SessionIDRemoved";
         STRING::size_type sessionIdLocation;
         do
         {
@@ -380,10 +384,11 @@
     return newContent;
 }
 
+
 void TestKmlService::SaveToFile(CREFSTRING content, CREFSTRING filename)
 {
     FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("wt"));
-    if (file != NULL) 
+    if (file != NULL)
     {
         int len = content.length();
         fwprintf (file, content.c_str());
@@ -391,11 +396,12 @@
     }
 }
 
+
 STRING TestKmlService::LoadFromFile(CREFSTRING filename)
 {
     STRING content;
     FILE* file = ACE_OS::fopen(MG_WCHAR_TO_TCHAR(filename), ACE_TEXT("rt"));
-    if (file != NULL) 
+    if (file != NULL)
     {
         wchar_t buffer[1024];
         while(fgetws(buffer, 1024, file) != NULL)
@@ -407,6 +413,7 @@
     return content;
 }
 
+
 bool TestKmlService::CompareContent(MgByteReader* reader, CREFSTRING referenceFile)
 {
     bool match = false;
@@ -433,6 +440,3 @@
 
     return match;
 }
-
-
-

Modified: trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.h	2007-03-08 12:10:40 UTC (rev 1177)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.h	2007-03-08 12:27:21 UTC (rev 1178)
@@ -1,5 +1,5 @@
 //
-//  Copyright (C) 2004-2006  Autodesk, Inc.
+//  Copyright (C) 2007 by Autodesk, Inc.
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of version 2.1 of the GNU Lesser
@@ -34,7 +34,6 @@
     CPPUNIT_TEST_SUITE_END();
 
 public:
-
     TestKmlService();
     ~TestKmlService();
 
@@ -49,7 +48,6 @@
     void TestCase_GetFeaturesKml();
 
 private:
-
     void PublishTheResources();
     STRING RemoveSessionIds(CREFSTRING content);
     void SaveToFile(CREFSTRING content, CREFSTRING filename);

Modified: trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2007-03-08 12:10:40 UTC (rev 1177)
+++ trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2007-03-08 12:27:21 UTC (rev 1178)
@@ -1510,4 +1510,4 @@
         SAFE_RELEASE(e);
         CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
     }
-}
\ No newline at end of file
+}

Modified: trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp	2007-03-08 12:10:40 UTC (rev 1177)
+++ trunk/MgDev/Server/src/UnitTesting/TestSiteManager.cpp	2007-03-08 12:27:21 UTC (rev 1178)
@@ -312,4 +312,3 @@
         throw;
     }
 }
-



More information about the mapguide-commits mailing list