mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:29:32 +02:00
* Fixed TestBlobSize test
git-svn-id: trunk@12510 -
This commit is contained in:
parent
0899d13e3a
commit
3657380e77
@ -58,6 +58,7 @@ type
|
||||
|
||||
procedure TestParametersAndDates;
|
||||
procedure TestExceptOnsecClose;
|
||||
procedure TestErrorOnEmptyStatement;
|
||||
|
||||
procedure TestBlob;
|
||||
procedure TestChangeBlob;
|
||||
@ -85,7 +86,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses sqldbtoolsunit,toolsunit, variants, sqldb, bufdataset, strutils;
|
||||
uses sqldbtoolsunit,toolsunit, variants, sqldb, bufdataset, strutils, dbconst;
|
||||
|
||||
Type HackedDataset = class(TDataset);
|
||||
|
||||
@ -1514,6 +1515,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestFieldTypes.TestErrorOnEmptyStatement;
|
||||
var PassException : boolean;
|
||||
begin
|
||||
PassException:=False;
|
||||
with TSQLDBConnector(DBConnector).Query do
|
||||
begin
|
||||
sql.Text := '';
|
||||
try
|
||||
Open;
|
||||
except
|
||||
on E:EDatabaseError do
|
||||
if pos(SErrNoStatement,E.Message) > -1 then PassException := True;
|
||||
end;
|
||||
AssertTrue(PassException);
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
if uppercase(dbconnectorname)='SQL' then RegisterTest(TTestFieldTypes);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user