fcl-db test: rename obsolete test plus comment why it is safe to remove him at all. See also bug #22124

git-svn-id: trunk@22850 -
This commit is contained in:
lacak 2012-10-26 08:43:48 +00:00
parent 8c73b0b17b
commit 3aedcd11f3

View File

@ -159,8 +159,8 @@ type
procedure TestBug7007;
procedure TestBug6893;
procedure TestRequired;
procedure TestOldValueObsolete;
procedure TestOldValue;
procedure TestOldValue1;
procedure TestModified;
end;
@ -618,17 +618,26 @@ begin
DBConnector.StopTest;
end;
procedure TTestCursorDBBasics.TestOldValue;
procedure TTestCursorDBBasics.TestOldValueObsolete;
var v : variant;
bufds: TDataset;
begin
// this test was created as reaction to AV bug found in TCustomBufDataset.GetFieldData
// when retrieving OldValue (State=dsOldValue) of newly inserted or appended record.
// In this case was CurrBuff set to nil (and not checked),
// because OldValuesBuffer for just inserted record is nil. See rev.17704
// (So purpose of this test isn't test InsertRecord on empty dataset or so)
// Later was this test replaced by more complex TestOldValue (superset of old test),
// but next to it was restored back also original test.
// So now we have two tests which test same thing, where this 'old' one is subset of 'new' one
// Ideal solution would be remove this 'old' test as it does not test anything what is not tested elsewhere ...
bufds := DBConnector.GetNDataset(0) as TDataset;
bufds.Open;
bufds.InsertRecord([0,'name']);
v := VarToStr(bufds.fields[1].OldValue);
end;
procedure TTestCursorDBBasics.TestOldValue1;
procedure TTestCursorDBBasics.TestOldValue;
begin
with DBConnector.GetNDataset(1) as TDataset do
begin;