소스 검색

* Ignore tests which are not applicable when firebird is tested

git-svn-id: trunk@8973 -
joost 18 년 전
부모
커밋
a193a1285f
2개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 1
      packages/fcl-db/tests/testdbbasics.pas
  2. 7 2
      packages/fcl-db/tests/testsqlfieldtypes.pas

+ 2 - 1
packages/fcl-db/tests/testdbbasics.pas

@@ -618,7 +618,8 @@ begin
 
   AFld := ADS.FindField('F'+FieldTypeNames[AfieldType]);
 
-  AssertNotNull('Fields of the type ' + FieldTypeNames[AfieldType] + ' are not supported by this type of dataset',AFld);
+  if not assigned (AFld) then
+    Ignore('Fields of the type ' + FieldTypeNames[AfieldType] + ' are not supported by this type of dataset');
   AssertTrue(Afld.DataType = AFieldType);
   AssertEquals(ADatasize,Afld.DataSize );
 end;

+ 7 - 2
packages/fcl-db/tests/testsqlfieldtypes.pas

@@ -348,7 +348,8 @@ var
   i             : byte;
 
 begin
-//  AssertTrue(SIgnoreAssertion,SQLDbType = postgresql); // Only postgres accept this type-definition
+  if SQLDbType<>postgresql then Ignore('This test does only apply to Postgres, since others don''t support varchars without length given');
+
   CreateTableWithFieldType(ftString,'VARCHAR');
   TestFieldDeclaration(ftString,dsMaxStringSize+1);
 
@@ -995,7 +996,7 @@ end;
 procedure TTestFieldTypes.TestBug9744;
 var i : integer;
 begin
-  AssertTrue('This test does not apply to Interbase/Firebird, since it has no double field-type',SQLDbType<>interbase);
+  if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it has no double field-type');
 
   with TSQLDBConnector(DBConnector) do
     begin
@@ -1095,6 +1096,8 @@ end;
 
 procedure TTestFieldTypes.TestTemporaryTable;
 begin
+  if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it doesn''t support temporary tables');
+
   with TSQLDBConnector(DBConnector).Query do
     begin
     SQL.Clear;
@@ -1149,6 +1152,8 @@ end;
 procedure TTestFieldTypes.TestParametersAndDates;
 // See bug 7205
 begin
+  if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it doesn''t use semicolons for casts');
+
   with TSQLDBConnector(DBConnector).Query do
     begin
     SQL.Clear;