mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 14:29:14 +02:00
* TestBug9744 disabled for Postgresql too
* GetindexDefs-tests case-insensitive * Removed writeln from test git-svn-id: trunk@8983 -
This commit is contained in:
parent
f6ba07a2fd
commit
4599a298f6
@ -1002,7 +1002,7 @@ end;
|
|||||||
procedure TTestFieldTypes.TestBug9744;
|
procedure TTestFieldTypes.TestBug9744;
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it has no double field-type');
|
if SQLDbType in [interbase,postgresql] then Ignore('This test does not apply to this db-engine, since it has no double field-type');
|
||||||
|
|
||||||
with TSQLDBConnector(DBConnector) do
|
with TSQLDBConnector(DBConnector) do
|
||||||
begin
|
begin
|
||||||
@ -1065,11 +1065,11 @@ begin
|
|||||||
ds.Prepare;
|
ds.Prepare;
|
||||||
ds.IndexDefs.Update;
|
ds.IndexDefs.Update;
|
||||||
AssertEquals(1,ds.IndexDefs.count);
|
AssertEquals(1,ds.IndexDefs.count);
|
||||||
AssertEquals('ID',ds.indexdefs[0].Fields);
|
AssertTrue(CompareText('ID',ds.indexdefs[0].Fields)=0);
|
||||||
Asserttrue(ds.indexdefs[0].Options=[ixPrimary,ixUnique]);
|
Asserttrue(ds.indexdefs[0].Options=[ixPrimary,ixUnique]);
|
||||||
ds.IndexDefs.Update;
|
ds.IndexDefs.Update;
|
||||||
AssertEquals(1,ds.IndexDefs.count);
|
AssertEquals(1,ds.IndexDefs.count);
|
||||||
AssertEquals('ID',ds.indexdefs[0].Fields);
|
AssertTrue(CompareText('ID',ds.indexdefs[0].Fields)=0);
|
||||||
Asserttrue(ds.indexdefs[0].Options=[ixPrimary,ixUnique]);
|
Asserttrue(ds.indexdefs[0].Options=[ixPrimary,ixUnique]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1129,13 +1129,13 @@ begin
|
|||||||
AssertEquals(1,ds.IndexDefs.count);
|
AssertEquals(1,ds.IndexDefs.count);
|
||||||
inddefs := HackedDataset(ds).GetIndexDefs(ds.IndexDefs,[ixPrimary]);
|
inddefs := HackedDataset(ds).GetIndexDefs(ds.IndexDefs,[ixPrimary]);
|
||||||
AssertEquals(1,inddefs.count);
|
AssertEquals(1,inddefs.count);
|
||||||
AssertEquals('ID',inddefs[0].Fields);
|
AssertTrue(CompareText('ID',inddefs[0].Fields)=0);
|
||||||
Asserttrue(inddefs[0].Options=[ixPrimary,ixUnique]);
|
Asserttrue(inddefs[0].Options=[ixPrimary,ixUnique]);
|
||||||
inddefs.Free;
|
inddefs.Free;
|
||||||
|
|
||||||
inddefs := HackedDataset(ds).GetIndexDefs(ds.IndexDefs,[ixPrimary,ixUnique]);
|
inddefs := HackedDataset(ds).GetIndexDefs(ds.IndexDefs,[ixPrimary,ixUnique]);
|
||||||
AssertEquals(1,inddefs.count);
|
AssertEquals(1,inddefs.count);
|
||||||
AssertEquals('ID',inddefs[0].Fields);
|
AssertTrue(CompareText('ID',inddefs[0].Fields)=0);
|
||||||
Asserttrue(inddefs[0].Options=[ixPrimary,ixUnique]);
|
Asserttrue(inddefs[0].Options=[ixPrimary,ixUnique]);
|
||||||
inddefs.Free;
|
inddefs.Free;
|
||||||
|
|
||||||
@ -1157,6 +1157,7 @@ end;
|
|||||||
|
|
||||||
procedure TTestFieldTypes.TestParametersAndDates;
|
procedure TTestFieldTypes.TestParametersAndDates;
|
||||||
// See bug 7205
|
// See bug 7205
|
||||||
|
var ADateStr : String;
|
||||||
begin
|
begin
|
||||||
if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it doesn''t use semicolons for casts');
|
if SQLDbType=interbase then Ignore('This test does not apply to Interbase/Firebird, since it doesn''t use semicolons for casts');
|
||||||
|
|
||||||
@ -1166,7 +1167,8 @@ begin
|
|||||||
sql.add('select now()::date as current_date where 1=1');
|
sql.add('select now()::date as current_date where 1=1');
|
||||||
open;
|
open;
|
||||||
first;
|
first;
|
||||||
writeln(fields[0].asstring); // return the correct date
|
ADateStr:=fields[0].asstring; // return the correct date
|
||||||
|
// writeln(fields[0].asstring);
|
||||||
close;
|
close;
|
||||||
|
|
||||||
sql.clear;
|
sql.clear;
|
||||||
@ -1174,7 +1176,8 @@ begin
|
|||||||
params.parambyname('PARAM1').asinteger:= 1;
|
params.parambyname('PARAM1').asinteger:= 1;
|
||||||
open;
|
open;
|
||||||
first;
|
first;
|
||||||
writeln(fields[0].asstring); // return invalid date
|
AssertEquals(ADateStr,fields[0].asstring); // return invalid date
|
||||||
|
// writeln(fields[0].asstring);
|
||||||
close;
|
close;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user