Browse Source

* Fixed some tests for firebird

git-svn-id: trunk@17222 -
michael 14 years ago
parent
commit
1c0c6656f3
1 changed files with 10 additions and 2 deletions
  1. 10 2
      packages/fcl-db/tests/testfieldtypes.pas

+ 10 - 2
packages/fcl-db/tests/testfieldtypes.pas

@@ -1391,7 +1391,10 @@ begin
     begin
     begin
     with query do
     with query do
       begin
       begin
-      SQL.Text:='select NAME from FPDEV where NAME=''TestName21'' limit 1';
+      if (sqlDBtype=interbase) then
+        SQL.Text:='select first 1 NAME from FPDEV where NAME=''TestName21'''
+      else
+        SQL.Text:='select NAME from FPDEV where NAME=''TestName21'' limit 1';
       Open;
       Open;
       close;
       close;
       ServerFilter:='ID=21';
       ServerFilter:='ID=21';
@@ -1626,6 +1629,8 @@ procedure TTestFieldTypes.TestSQLClob;
     AssertEquals(testStringValues[a],AField.AsString);
     AssertEquals(testStringValues[a],AField.AsString);
   end;
   end;
 begin
 begin
+  if SQLDbType=interbase then
+      Ignore('This test does not apply to Interbase/Firebird, since it does not support CLOB fields');
   TestSQLFieldType(ftMemo, 'CLOB', 0, @TestSQLClob_GetSQLText, @CheckFieldValue);
   TestSQLFieldType(ftMemo, 'CLOB', 0, @TestSQLClob_GetSQLText, @CheckFieldValue);
 end;
 end;
 
 
@@ -1641,7 +1646,10 @@ procedure TTestFieldTypes.TestSQLLargeint;
     AssertEquals(testLargeIntValues[a],AField.AsLargeInt);
     AssertEquals(testLargeIntValues[a],AField.AsLargeInt);
   end;
   end;
 begin
 begin
-  TestSQLFieldType(ftLargeint, 'LARGEINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue);
+  if sqlDBType=interbase then
+    TestSQLFieldType(ftLargeint, 'BIGINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue)
+  else
+    TestSQLFieldType(ftLargeint, 'LARGEINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue);
 end;
 end;