[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fdo-commits
Subject:    [fdo-commits] r7030 - in trunk/Providers/SDF/Src: Provider UnitTest
From:       svn_fdo () osgeo ! org
Date:       2014-03-18 12:57:56
Message-ID: 20140318125757.6CE1D390427 () trac ! osgeo ! org
[Download RAW message or body]

Author: jng
Date: 2014-03-18 05:57:56 -0700 (Tue, 18 Mar 2014)
New Revision: 7030

Modified:
   trunk/Providers/SDF/Src/Provider/SdfImpExtendedSelect.cpp
   trunk/Providers/SDF/Src/UnitTest/AssociationSchemaTest.cpp
   trunk/Providers/SDF/Src/UnitTest/ConnectionInfoTest.cpp
   trunk/Providers/SDF/Src/UnitTest/SchemaTest.cpp
   trunk/Providers/SDF/Src/UnitTest/SelectTest.cpp
   trunk/Providers/SDF/Src/UnitTest/UnitTest.vcxproj
   trunk/Providers/SDF/Src/UnitTest/UnitTestUtil.cpp
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err10_master.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err1_master.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err2_master.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err3_imaster.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err4_master.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err5_imaster.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err6_imaster.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err7_master.txt
   trunk/Providers/SDF/Src/UnitTest/apply_schema_err8_master.txt
Log:
#883: Improve unit test stability for SDF. Reviewed by Greg Boone.

Modified: trunk/Providers/SDF/Src/Provider/SdfImpExtendedSelect.cpp
===================================================================
--- trunk/Providers/SDF/Src/Provider/SdfImpExtendedSelect.cpp	2014-03-14 19:23:36 UTC \
                (rev 7029)
+++ trunk/Providers/SDF/Src/Provider/SdfImpExtendedSelect.cpp	2014-03-18 12:57:56 UTC \
(rev 7030) @@ -218,7 +218,11 @@
 {
 	bool  inMemory = false;
 	bool  fileExits = false;
+#ifdef _WIN32
 	wchar_t fullpath[1024];
+#else
+	wchar_t fullpath[PATH_MAX];
+#endif
 	SdfConnection*  conn = SdfConnection::Create();
 	if( wcscmp(L":memory:",sdfFile)==0)
 	{
@@ -237,12 +241,12 @@
 		}
 	//	_wremove(fullpath)
 #else
-		char cpath[1024];
-		char cfullpath[1024];
-		wcstombs(cpath, sdfFile, 1024);
+		char cpath[PATH_MAX];
+		char cfullpath[PATH_MAX];
+		wcstombs(cpath, sdfFile, PATH_MAX);
 		realpath(cpath, cfullpath);
 	    
-		mbstowcs(fullpath, cfullpath, 1024);
+		mbstowcs(fullpath, cfullpath, PATH_MAX);
 		FILE *fp = fopen((const char*)FdoStringP(fullpath), "r");
 		if( fp )
 		{

Modified: trunk/Providers/SDF/Src/UnitTest/AssociationSchemaTest.cpp
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/AssociationSchemaTest.cpp	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/AssociationSchemaTest.cpp	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -55,12 +55,12 @@
     wchar_t fullpath[1024];
     _wfullpath(fullpath, TEST_FILE, 1024);
 #else
-    char cpath[1024];
-    char cfullpath[1024];
-    wcstombs(cpath, TEST_FILE, 1024);
+    char cpath[PATH_MAX];
+    char cfullpath[PATH_MAX];
+    wcstombs(cpath, TEST_FILE, PATH_MAX);
     realpath(cpath, cfullpath);
-    wchar_t fullpath[1024];
-    mbstowcs(fullpath, cfullpath, 1024);
+    wchar_t fullpath[PATH_MAX];
+    mbstowcs(fullpath, cfullpath, PATH_MAX);
 #endif
 
     FdoPtr<IConnectionManager> manager = \
FdoFeatureAccessManager::GetConnectionManager ();

Modified: trunk/Providers/SDF/Src/UnitTest/ConnectionInfoTest.cpp
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/ConnectionInfoTest.cpp	2014-03-14 19:23:36 UTC \
                (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/ConnectionInfoTest.cpp	2014-03-18 12:57:56 UTC \
(rev 7030) @@ -116,12 +116,12 @@
     wchar_t fullpath[1024];
     _wfullpath(fullpath, CI_TEST_FILE, 1024);
 #else
-    char cpath[1024];
-    char cfullpath[1024];
-    wcstombs(cpath, CI_TEST_FILE, 1024);
+    char cpath[PATH_MAX];
+    char cfullpath[PATH_MAX];
+    wcstombs(cpath, CI_TEST_FILE, PATH_MAX);
     realpath(cpath, cfullpath);
-    wchar_t fullpath[1024];
-    mbstowcs(fullpath, cfullpath, 1024);
+    wchar_t fullpath[PATH_MAX];
+    mbstowcs(fullpath, cfullpath, PATH_MAX);
 #endif
 
     size_t len = wcstombs(NULL, CI_TEST_FILE, 0);

Modified: trunk/Providers/SDF/Src/UnitTest/SchemaTest.cpp
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/SchemaTest.cpp	2014-03-14 19:23:36 UTC (rev \
                7029)
+++ trunk/Providers/SDF/Src/UnitTest/SchemaTest.cpp	2014-03-18 12:57:56 UTC (rev \
7030) @@ -50,12 +50,12 @@
     wchar_t fullpath[1024];
     _wfullpath(fullpath, path, 1024);
 #else
-    char cpath[1024];
-    char cfullpath[1024];
-    wcstombs(cpath, path, 1024);
+    char cpath[PATH_MAX];
+    char cfullpath[PATH_MAX];
+    wcstombs(cpath, path, PATH_MAX);
     realpath(cpath, cfullpath);
-    wchar_t fullpath[1024];
-    mbstowcs(fullpath, cfullpath, 1024);
+    wchar_t fullpath[PATH_MAX];
+    mbstowcs(fullpath, cfullpath, PATH_MAX);
 #endif
 
     std::wstring connStr;

Modified: trunk/Providers/SDF/Src/UnitTest/SelectTest.cpp
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/SelectTest.cpp	2014-03-14 19:23:36 UTC (rev \
                7029)
+++ trunk/Providers/SDF/Src/UnitTest/SelectTest.cpp	2014-03-18 12:57:56 UTC (rev \
7030) @@ -199,12 +199,12 @@
     wchar_t fullpath[1024];
     _wfullpath(fullpath, SELECT_TEST_FILE, 1024);
 #else
-    char cpath[1024];
-    char cfullpath[1024];
-    wcstombs(cpath, SELECT_TEST_FILE, 1024);
+    char cpath[PATH_MAX];
+    char cfullpath[PATH_MAX];
+    wcstombs(cpath, SELECT_TEST_FILE, PATH_MAX);
     realpath(cpath, cfullpath);
-    wchar_t fullpath[1024];
-    mbstowcs(fullpath, cfullpath, 1024);
+    wchar_t fullpath[PATH_MAX];
+    mbstowcs(fullpath, cfullpath, PATH_MAX);
 #endif
 
     size_t len = wcstombs(NULL, SELECT_TEST_FILE, 0);

Modified: trunk/Providers/SDF/Src/UnitTest/UnitTest.vcxproj
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/UnitTest.vcxproj	2014-03-14 19:23:36 UTC (rev \
                7029)
+++ trunk/Providers/SDF/Src/UnitTest/UnitTest.vcxproj	2014-03-18 12:57:56 UTC (rev \
7030) @@ -519,6 +519,7 @@
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)CopyFdo.ilk;%(Outputs)</Outputs>
                
       <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying \
                FDO files</Message>
       <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy \
$(FDO)\unmanaged\Bin\Win32\Release\FDO.dll $(OutDir) +copy \
$(FDO)\unmanaged\Bin\Win32\Release\FDOMessage.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win32\Release\FDOCommon.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win32\Release\FDOGeometry.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win32\Release\FDOSpatial.dll $(OutDir) @@ -532,6 +533,7 @@
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)CopyFdo.ilk;%(Outputs)</Outputs>
                
       <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying FDO \
                files</Message>
       <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy \
$(FDO)\unmanaged\Bin\Win64\Release\FDO.dll $(OutDir) +copy \
$(FDO)\unmanaged\Bin\Win64\Release\FDOMessage.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win64\Release\FDOCommon.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win64\Release\FDOGeometry.dll $(OutDir)  copy \
$(FDO)\unmanaged\Bin\Win64\Release\FDOSpatial.dll $(OutDir)

Modified: trunk/Providers/SDF/Src/UnitTest/UnitTestUtil.cpp
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/UnitTestUtil.cpp	2014-03-14 19:23:36 UTC (rev \
                7029)
+++ trunk/Providers/SDF/Src/UnitTest/UnitTestUtil.cpp	2014-03-18 12:57:56 UTC (rev \
7030) @@ -119,12 +119,12 @@
     wchar_t fullpath[1024];
     _wfullpath(fullpath, fileName, 1024);
 #else
-    char cpath[1024];
-    char cfullpath[1024];
-    wcstombs(cpath, fileName, 1024);
+    char cpath[PATH_MAX];
+    char cfullpath[PATH_MAX];
+    wcstombs(cpath, fileName, PATH_MAX);
     realpath(cpath, cfullpath);
-    wchar_t fullpath[1024];
-    mbstowcs(fullpath, cfullpath, 1024);
+    wchar_t fullpath[PATH_MAX];
+    mbstowcs(fullpath, cfullpath, PATH_MAX);
 #endif
 
     FdoIConnection *conn = inConn;

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err10_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err10_master.txt	2014-03-14 \
                19:23:36 UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err10_master.txt	2014-03-18 \
12:57:56 UTC (rev 7030) @@ -1 +1 @@
- Cannot add feature schema 'Land'; multiple schemas not supported 
+Cannot add feature schema 'Land'; multiple schemas not supported 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err1_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err1_master.txt	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err1_master.txt	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -1 +1 @@
- Cannot add feature schema 'Acad'; it already exists 
+Cannot add feature schema 'Acad'; it already exists 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err2_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err2_master.txt	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err2_master.txt	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -1 +1 @@
- Cannot delete schema definition 'Acad'; it has objects 
+Cannot delete schema definition 'Acad'; it has objects 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err3_imaster.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err3_imaster.txt	2014-03-14 \
                19:23:36 UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err3_imaster.txt	2014-03-18 \
12:57:56 UTC (rev 7030) @@ -1,4 +1,4 @@
- Element 'Acad:Orphan SubClass' references class (Orphan Class) which does not \
                belong to a feature schema. 
- Cannot add class 'Acad:ElectricDevice'; it already exists 
- Error resolving Feature Schema references; base class 'Acad:Ghost' for class \
                'Acad:Base Missing' not found.  
- Error resolving Feature Schemas references; geometry property 'Geometry' for \
feature class 'Acad:NullIds1' not found.  +Element 'Acad:Orphan SubClass' references \
class (Orphan Class) which does not belong to a feature schema.  +Cannot add class \
'Acad:ElectricDevice'; it already exists  +Error resolving Feature Schema references; \
base class 'Acad:Ghost' for class 'Acad:Base Missing' not found.   +Error resolving \
Feature Schemas references; geometry property 'Geometry' for feature class \
'Acad:NullIds1' not found. 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err4_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err4_master.txt	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err4_master.txt	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -1 +1 @@
- Cannot modify feature schema 'Non Existent'; it does not exist 
+Cannot modify feature schema 'Non Existent'; it does not exist 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err5_imaster.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err5_imaster.txt	2014-03-14 \
                19:23:36 UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err5_imaster.txt	2014-03-18 \
12:57:56 UTC (rev 7030) @@ -1,25 +1,25 @@
- Cannot delete class definition 'Acad:AcDbEntity'; it has objects 
- Unsupported Schema modification; Cannot make abstract class 'Acad:ElectricDevice' \
                concrete 
- Unsupported Schema modification; Cannot change autogeneration setting for data \
                property 'Acad:ElectricDevice.FeatId' 
- Unsupported Schema modification; Cannot change geometry types for geometric \
                property 'Acad:ElectricDevice.Geometry' 
- Unsupported Schema modification; Cannot change geometry types for geometric \
                property 'Acad:ElectricDevice.Geometry' 
- Unsupported Schema modification; Cannot add/remove elevation dimension to/from \
                geometric property 'Acad:ElectricDevice.Geometry' 
- Unsupported Schema modification; Cannot add/remove measure dimension to/from \
                geometric property 'Acad:ElectricDevice.Geometry' 
- Unsupported Schema modification; Cannot make class 'Acad:Transformer' abstract 
- Unsupported Schema modification; Cannot change base class for 'Acad:Transformer' \
                from 'Acad:ElectricDevice' to '' 
- Unsupported Schema modification; Cannot change data type for property \
                'Acad:Transformer.Voltage' from 'decimal' to 'string' 
- Unsupported Schema modification; Cannot change property 'Acad:Transformer.Voltage' \
                to be nullable 
- Unsupported Schema modification; Cannot change precision for data property \
                'Acad:Transformer.Voltage' from '10' to '45' 
- Unsupported Schema modification; Cannot change scale for data property \
                'Acad:Transformer.Voltage' from '1' to '8' 
- Unsupported Schema modification; Cannot change default value for data property \
                'Acad:Transformer.Phase' from '' to 'A' 
- Unsupported Schema modification; Cannot change length for data property \
                'Acad:Transformer.Phase' from '1' to '3' 
- Unsupported Schema modification; Cannot change property 'Acad:Transformer.PartNum' \
                to be not nullable 
- Unsupported Schema modification; Cannot change autogeneration setting for data \
                property 'Acad:Transformer.SerialNum' 
- Unsupported Schema modification; Cannot change property \
                'Acad:Transformer.SerialNum' to be read-only 
- Cannot add property 'Acad:Transformer.LastRepairDate'; it already exists 
- Cannot delete class definition 'Acad:Conductor'; it has objects 
- Cannot change property type of property 'Acad:Pole.Height'.  
- Cannot modify property 'Acad:Pole.Material'; it does not exist 
- Cannot modify class 'Acad:NoExists'; it does not exist 
- Cannot delete class 'Acad:Customer'; it is the base class for 'Acad:Customer - \
                Residential' 
- Cannot delete class 'Acad:Customer'; it is the base class for 'Acad:Customer - \
Business'  +Cannot delete class definition 'Acad:AcDbEntity'; it has objects 
+Unsupported Schema modification; Cannot make abstract class 'Acad:ElectricDevice' \
concrete  +Unsupported Schema modification; Cannot change autogeneration setting for \
data property 'Acad:ElectricDevice.FeatId'  +Unsupported Schema modification; Cannot \
change geometry types for geometric property 'Acad:ElectricDevice.Geometry'  \
+Unsupported Schema modification; Cannot change geometry types for geometric property \
'Acad:ElectricDevice.Geometry'  +Unsupported Schema modification; Cannot add/remove \
elevation dimension to/from geometric property 'Acad:ElectricDevice.Geometry'  \
+Unsupported Schema modification; Cannot add/remove measure dimension to/from \
geometric property 'Acad:ElectricDevice.Geometry'  +Unsupported Schema modification; \
Cannot make class 'Acad:Transformer' abstract  +Unsupported Schema modification; \
Cannot change base class for 'Acad:Transformer' from 'Acad:ElectricDevice' to ''  \
+Unsupported Schema modification; Cannot change data type for property \
'Acad:Transformer.Voltage' from 'decimal' to 'string'  +Unsupported Schema \
modification; Cannot change property 'Acad:Transformer.Voltage' to be nullable  \
+Unsupported Schema modification; Cannot change precision for data property \
'Acad:Transformer.Voltage' from '10' to '45'  +Unsupported Schema modification; \
Cannot change scale for data property 'Acad:Transformer.Voltage' from '1' to '8'  \
+Unsupported Schema modification; Cannot change default value for data property \
'Acad:Transformer.Phase' from '' to 'A'  +Unsupported Schema modification; Cannot \
change length for data property 'Acad:Transformer.Phase' from '1' to '3'  \
+Unsupported Schema modification; Cannot change property 'Acad:Transformer.PartNum' \
to be not nullable  +Unsupported Schema modification; Cannot change autogeneration \
setting for data property 'Acad:Transformer.SerialNum'  +Unsupported Schema \
modification; Cannot change property 'Acad:Transformer.SerialNum' to be read-only  \
+Cannot add property 'Acad:Transformer.LastRepairDate'; it already exists  +Cannot \
delete class definition 'Acad:Conductor'; it has objects  +Cannot change property \
type of property 'Acad:Pole.Height'.   +Cannot modify property 'Acad:Pole.Material'; \
it does not exist  +Cannot modify class 'Acad:NoExists'; it does not exist 
+Cannot delete class 'Acad:Customer'; it is the base class for 'Acad:Customer - \
Residential'  +Cannot delete class 'Acad:Customer'; it is the base class for \
'Acad:Customer - Business' 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err6_imaster.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err6_imaster.txt	2014-03-14 \
                19:23:36 UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err6_imaster.txt	2014-03-18 \
12:57:56 UTC (rev 7030) @@ -1,6 +1,6 @@
- Cannot delete a property 'Acad:Conductor.underground'; its class has objects 
- Unsupport Schema modification; Cannot delete property 'Acad:Conductor.underground' 
- Cannot add not-nullable property 'Acad:Conductor.Conductivity'; its class has \
                objects 
- Unsupported Schema modification; Cannot change identity properties for class \
                'Acad:Customer' from (First Name, Last Name) to (Last Name) 
- Unsupported Schema modification; Cannot change property 'Acad:Customer.Credit \
                Rating' to be writable 
- Cannot change class type of class 'Acad:'Address'.  
+Cannot delete a property 'Acad:Conductor.underground'; its class has objects 
+Unsupport Schema modification; Cannot delete property 'Acad:Conductor.underground' 
+Cannot add not-nullable property 'Acad:Conductor.Conductivity'; its class has \
objects  +Unsupported Schema modification; Cannot change identity properties for \
class 'Acad:Customer' from (First Name, Last Name) to (Last Name)  +Unsupported \
Schema modification; Cannot change property 'Acad:Customer.Credit Rating' to be \
writable  +Cannot change class type of class 'Acad:'Address'.  

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err7_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err7_master.txt	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err7_master.txt	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -1 +1 @@
- Unsupported Schema modification; Cannot modify GeometryProperty for feature class \
'Acad:Conductor'  +Unsupported Schema modification; Cannot modify GeometryProperty \
for feature class 'Acad:Conductor' 

Modified: trunk/Providers/SDF/Src/UnitTest/apply_schema_err8_master.txt
===================================================================
--- trunk/Providers/SDF/Src/UnitTest/apply_schema_err8_master.txt	2014-03-14 19:23:36 \
                UTC (rev 7029)
+++ trunk/Providers/SDF/Src/UnitTest/apply_schema_err8_master.txt	2014-03-18 12:57:56 \
UTC (rev 7030) @@ -1,2 +1,2 @@
- Cannot delete a property 'Acad:Conductor.Conductivity'; its class has objects 
- Unsupport Schema modification; Cannot delete property 'Acad:Conductor.Conductivity' \
 +Cannot delete a property 'Acad:Conductor.Conductivity'; its class has objects 
+Unsupport Schema modification; Cannot delete property 'Acad:Conductor.Conductivity' 

_______________________________________________
fdo-commits mailing list
fdo-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic