mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 11:00:28 +02:00
* Patch from Ludo Brands to test Modified behaviour
git-svn-id: trunk@21876 -
This commit is contained in:
parent
c10901e460
commit
2bb5a1ba7b
@ -161,6 +161,7 @@ type
|
|||||||
procedure TestRequired;
|
procedure TestRequired;
|
||||||
procedure TestOldValue;
|
procedure TestOldValue;
|
||||||
procedure TestOldValue1;
|
procedure TestOldValue1;
|
||||||
|
procedure TestModified;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -650,6 +651,32 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestCursorDBBasics.TestModified;
|
||||||
|
begin
|
||||||
|
// Tests TDataSet.Modified property
|
||||||
|
with DBConnector.GetNDataset(true,1) as TDataset do
|
||||||
|
begin
|
||||||
|
Open;
|
||||||
|
CheckFalse(Modified);
|
||||||
|
|
||||||
|
Edit;
|
||||||
|
CheckFalse(Modified, 'After Edit');
|
||||||
|
Fields[1].AsString := Fields[1].AsString;
|
||||||
|
CheckTrue(Modified, 'After change');
|
||||||
|
Post;
|
||||||
|
CheckFalse(Modified, 'After Post');
|
||||||
|
|
||||||
|
Append;
|
||||||
|
CheckFalse(Modified, 'After Append');
|
||||||
|
Fields[0].AsInteger := 100;
|
||||||
|
CheckTrue(Modified, 'After change');
|
||||||
|
Cancel;
|
||||||
|
CheckFalse(Modified, 'After Cancel');
|
||||||
|
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestDBBasics.TestCanModifySpecialFields;
|
procedure TTestDBBasics.TestCanModifySpecialFields;
|
||||||
var ds : TDataset;
|
var ds : TDataset;
|
||||||
lds : TDataset;
|
lds : TDataset;
|
||||||
|
Loading…
Reference in New Issue
Block a user