Test Bug Fix: DBF INTEGER AUTOINC test is failing because of a bad DBF reference value

DBF INTEGER AUTOINC test: Added more info about NextVal and Step values
This commit is contained in:
fdbozzo
2017-12-02 14:29:08 +01:00
parent 62353694a2
commit af768fe7a1
6 changed files with 3210 additions and 19 deletions

Binary file not shown.

Binary file not shown.

3182
TESTS/FXUResults.db2 Normal file

File diff suppressed because one or more lines are too long

View File

@@ -126,14 +126,19 @@ DEFINE CLASS ft__foxbin2prg__c_conversor_prg_a_dbf AS FxuTestCase OF FxuTestCase
*-- Visualizaci<63>n de valores *-- Visualizaci<63>n de valores
THIS.messageout( 'Cantidad de campos: ' + TRANSFORM(lnFields_OUT) ) THIS.messageout( 'Cantidad de campos: ' + TRANSFORM(lnFields_OUT) )
THIS.messageout( '' ) THIS.messageout( '' )
THIS.messageout( PADR('Nombre',12) + ' ' + PADC('Tipo',4) + ' ' + PADL('Long',4) + ' ' + PADL('Dec',4) ) THIS.messageout( PADR('Nombre',12) + ' ' + PADC('Tipo',4) + ' ' + PADL('Long',4) + ' ' + PADL('Dec',4) ;
THIS.messageout( PADR('----------',12) + ' ' + PADC('----',4) + ' ' + PADL('----',4) + ' ' + PADL('---',4) ) + ' ' + PADL('Next',4) + ' ' + PADL('Step',4) )
THIS.messageout( PADR('----------',12) + ' ' + PADC('----',4) + ' ' + PADL('----',4) + ' ' + PADL('---',4) ;
+ ' ' + PADL('----',4) + ' ' + PADL('----',4) )
FOR I = 1 TO lnFields_IN FOR I = 1 TO lnFields_IN
THIS.messageout( PADR(laCampos_IN(I,1),12) + ' ' + PADC(laCampos_IN(I,2),4) + ' ' + PADL(laCampos_IN(I,3),4) + ' ' + PADL(laCampos_IN(I,4),4) ) THIS.messageout( PADR(laCampos_IN(I,1),12) + ' ' + PADC(laCampos_IN(I,2),4) ;
+ ' ' + PADL(laCampos_IN(I,3),4) + ' ' + PADL(laCampos_IN(I,4),4) ;
+ ' ' + PADL(laCampos_IN(I,17),4) + ' ' + PADL(laCampos_IN(I,18),4) )
ENDFOR ENDFOR
THIS.messageout( PADR('----------',12) + ' ' + PADC('----',4) + ' ' + PADL('----',4) + ' ' + PADL('---',4) ) THIS.messageout( PADR('----------',12) + ' ' + PADC('----',4) + ' ' + PADL('----',4) + ' ' + PADL('---',4) ;
+ ' ' + PADL('----',4) + ' ' + PADL('----',4) )
*-- Evaluaci<63>n de valores *-- Evaluaci<63>n de valores

3
TESTS/fxuresults.dbf.cfg Normal file
View File

@@ -0,0 +1,3 @@
DBF_Conversion_Support: 4
DBF_Conversion_Order: UPPER(TCLASS)+UPPER(TNAME)
DBF_Conversion_Condition: .T.

View File

@@ -887,7 +887,7 @@ DEFINE CLASS c_foxbin2prg AS Session
IF ATC("\PROGRAM FILES", THIS.c_TempDir) > 0 OR ATC("\ARCHIVOS DE PROGRAMA", THIS.c_TempDir) > 0 IF ATC("\PROGRAM FILES", THIS.c_TempDir) > 0 OR ATC("\ARCHIVOS DE PROGRAMA", THIS.c_TempDir) > 0
THIS.c_TempDir = GETENV("TEMP") THIS.c_TempDir = GETENV("TEMP")
ENDIF ENDIF
THIS.c_LogFile = ADDBS( THIS.c_TempDir ) + 'FoxBin2Prg_Debug.LOG' THIS.c_LogFile = ADDBS( THIS.c_TempDir ) + 'FoxBin2Prg_Debug.LOG'
THIS.c_ErrorLogFile = ADDBS( THIS.c_TempDir ) + 'FoxBin2Prg_Error.LOG' THIS.c_ErrorLogFile = ADDBS( THIS.c_TempDir ) + 'FoxBin2Prg_Error.LOG'
@@ -3710,7 +3710,7 @@ DEFINE CLASS c_foxbin2prg AS Session
*-- OPTIMIZACIÓN VC2/SC2/DC2: VERIFICO SI EL ARCHIVO BASE FUE PROCESADO PARA DESCARTAR REPROCESOS *-- OPTIMIZACIÓN VC2/SC2/DC2: VERIFICO SI EL ARCHIVO BASE FUE PROCESADO PARA DESCARTAR REPROCESOS
IF .n_UseClassPerFile > 0 AND .l_RedirectClassPerFileToMain ; IF .n_UseClassPerFile > 0 AND .l_RedirectClassPerFileToMain ;
OR NOT EMPTY(.c_ClassToConvert) OR NOT EMPTY(.c_ClassToConvert)
DO CASE DO CASE
CASE .n_RedirectClassType = 1 OR NOT EMPTY(.c_ClassToConvert) && Redireccionar solo esta clase CASE .n_RedirectClassType = 1 OR NOT EMPTY(.c_ClassToConvert) && Redireccionar solo esta clase
@@ -10240,23 +10240,23 @@ DEFINE CLASS c_conversor_prg_a_vcx AS c_conversor_prg_a_bin
IF toFoxBin2Prg.n_RedirectClassType = 1 OR NOT EMPTY(toFoxBin2Prg.c_ClassToConvert) && Redireccionar solo esta clase a main IF toFoxBin2Prg.n_RedirectClassType = 1 OR NOT EMPTY(toFoxBin2Prg.c_ClassToConvert) && Redireccionar solo esta clase a main
llReplaceClass = .T. llReplaceClass = .T.
IF EMPTY(toFoxBin2Prg.c_ClassToConvert) IF EMPTY(toFoxBin2Prg.c_ClassToConvert)
toFoxBin2Prg.c_OutputFile = FULLPATH( FORCEEXT( lcBaseFilename, 'VCX' ), .c_InputFile) toFoxBin2Prg.c_OutputFile = FULLPATH( FORCEEXT( lcBaseFilename, 'VCX' ), .c_InputFile)
ELSE ELSE
loClase = toModulo._Clases(1) loClase = toModulo._Clases(1)
* Ajusto el nombre interno de la clase al indicado en el nombre del archivo * Ajusto el nombre interno de la clase al indicado en el nombre del archivo
loClase._nombre = toFoxBin2Prg.c_ClassToConvert loClase._Nombre = toFoxBin2Prg.c_ClassToConvert
loClase._objname = toFoxBin2Prg.c_ClassToConvert loClase._ObjName = toFoxBin2Prg.c_ClassToConvert
* Reemplazo la propiedad Name * Reemplazo la propiedad Name
lnRow = ASCAN(loClase._props, 'Name', 1, -1, 1, 2+4+8) lnRow = ASCAN(loClase._Props, 'Name', 1, -1, 1, 2+4+8)
IF lnRow > 0 IF lnRow > 0
loClase._props(lnRow,2) = toFoxBin2Prg.c_ClassToConvert loClase._Props(lnRow,2) = toFoxBin2Prg.c_ClassToConvert
ENDIF ENDIF
* Y finalmente actualizo el memo * Y finalmente actualizo el memo
loClase._PROPERTIES = .classProps2Memo( @loClase, @toFoxBin2Prg ) loClase._PROPERTIES = .classProps2Memo( @loClase, @toFoxBin2Prg )
ENDIF ENDIF
toFoxBin2Prg.doBackup( .F., .T., '', '', '' ) toFoxBin2Prg.doBackup( .F., .T., '', '', '' )
IF ADIR( laFiles, toFoxBin2Prg.c_OutputFile, "", 1 ) = 1 IF ADIR( laFiles, toFoxBin2Prg.c_OutputFile, "", 1 ) = 1
@@ -15306,10 +15306,8 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base
FUNCTION OcxOutsideProjDir FUNCTION OcxOutsideProjDir
LPARAMETERS tcOcx, tcProjDir LPARAMETERS tcOcx, tcProjDir
* (This method is taken from Open Source project TwoFox, from Christof Wallenhaupt - http://www.foxpert.com/downloads.htm) * (This method is taken from Open Source project TwoFox, from Christof Wallenhaupt - http://www.foxpert.com/downloads.htm)
* Returns .T. when the OCX control resides outside the project directory * Returns .T. when the OCX control resides outside the project directory
LOCAL lcOcxDir, llOutside LOCAL lcOcxDir, llOutside
lcOcxDir = UPPER (JUSTPATH (m.tcOcx)) lcOcxDir = UPPER (JUSTPATH (m.tcOcx))
IF LEFT(m.lcOcxDir, LEN(m.tcProjDir)) == m.tcProjDir IF LEFT(m.lcOcxDir, LEN(m.tcProjDir)) == m.tcProjDir
@@ -15319,12 +15317,12 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base
ENDIF ENDIF
RETURN m.llOutside RETURN m.llOutside
ENDFUNC
PROCEDURE TruncateOle2 (tcOcx)
* (This method is taken from Open Source project TwoFox, from Christof Wallenhaupt - http://www.foxpert.com/downloads.htm) * (This method is taken from Open Source project TwoFox, from Christof Wallenhaupt - http://www.foxpert.com/downloads.htm)
* Cambios de un campo OLE2 exclusivamente en el nombre del archivo * Cambios de un campo OLE2 exclusivamente en el nombre del archivo
PROCEDURE TruncateOle2 (tcOcx)
REPLACE OLE2 WITH STRTRAN ( ; REPLACE OLE2 WITH STRTRAN ( ;
OLE2 ; OLE2 ;
,"OLEObject = " + m.tcOcx ; ,"OLEObject = " + m.tcOcx ;
@@ -15381,7 +15379,7 @@ DEFINE CLASS c_conversor_vcx_a_prg AS c_conversor_bin_a_prg
SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN ; SELECT _TABLAORIG.*,RECNO() regnum FROM _TABLAORIG INTO CURSOR TABLABIN ;
WHERE PLATFORM == 'WINDOWS ' ; WHERE PLATFORM == 'WINDOWS ' ;
AND ( PROPER(RESERVED1) == "Class" AND LOWER(OBJNAME) == toFoxBin2Prg.c_ClassToConvert ; AND ( PROPER(RESERVED1) == "Class" AND LOWER(OBJNAME) == toFoxBin2Prg.c_ClassToConvert ;
OR LOWER(parent) == toFoxBin2Prg.c_ClassToConvert ) ; OR LOWER( ALLTRIM( GETWORDNUM( _TABLAORIG.PARENT + '.', 1, '.' ) ) ) == toFoxBin2Prg.c_ClassToConvert ) ;
OR PLATFORM == 'COMMENT ' AND LOWER(OBJNAME) == toFoxBin2Prg.c_ClassToConvert OR PLATFORM == 'COMMENT ' AND LOWER(OBJNAME) == toFoxBin2Prg.c_ClassToConvert
ENDIF ENDIF
@@ -15469,9 +15467,12 @@ DEFINE CLASS c_conversor_vcx_a_prg AS c_conversor_bin_a_prg
*------------------------------------------------------------------------------- *-------------------------------------------------------------------------------
lnObjCount = 0 lnObjCount = 0
lnRecno = RECNO() lnRecno = RECNO()
LOCATE FOR UPPER( TABLABIN.PLATFORM ) = "WINDOWS" AND LOWER( ALLTRIM( GETWORDNUM( TABLABIN.PARENT, 1, '.' ) ) ) == LOWER(lcObjName) LOCATE FOR UPPER( TABLABIN.PLATFORM ) = "WINDOWS" ;
AND LOWER( ALLTRIM( GETWORDNUM( TABLABIN.PARENT, 1, '.' ) ) ) == LOWER(lcObjName)
SCAN REST WHILE UPPER( TABLABIN.PLATFORM ) = "WINDOWS" ;
AND LOWER( ALLTRIM( GETWORDNUM( TABLABIN.PARENT, 1, '.' ) ) ) == LOWER(lcObjName)
SCAN REST WHILE UPPER( TABLABIN.PLATFORM ) = "WINDOWS" AND LOWER( ALLTRIM( GETWORDNUM( TABLABIN.PARENT, 1, '.' ) ) ) == LOWER(lcObjName)
lnObjCount = lnObjCount + 1 lnObjCount = lnObjCount + 1
loRegObj = NULL loRegObj = NULL
SCATTER MEMO NAME loRegObj SCATTER MEMO NAME loRegObj