only for the sake of completeness:
procedure LogCompareResult(FunctionName: string; CompareResult: Boolean);
var
Inverse: Boolean;
begin
Inverse := IsInBlackList(FunctionName);
if CompareResult then
begin
if Inverse then
log.Message('CompareResult: '+FunctionName);
end
else begin
if not Inverse then
log.Message('CompareResult: '+FunctionName);
end;
end;
procedure BadBoy;
const FUNCTIONNAME = 'BadBoy';
var CompareResult;
begin
CompareResult := aqObject.CompareProperty(1, cmpEqual, 0, true);
LogCompareResult(FUNCTIONNAME, CompareResult);
end;
procedure BadBoy_Fixed;
const FUNCTIONNAME = 'BadBoy_Fixed';
var CompareResult;
begin
CompareResult := aqObject.CompareProperty(1, cmpEqual, 1, true);
LogCompareResult(FUNCTIONNAME, CompareResult);
end;
procedure GoodBoy;
const FUNCTIONNAME = 'GoodBoy';
var CompareResult;
begin
CompareResult := aqObject.CompareProperty(1, cmpEqual, 1, true);
LogCompareResult(FUNCTIONNAME, CompareResult);
end;
procedure Test01;
begin
BadBoy;
BadBoy_Fixed;
GoodBoy;
end;
BlackListBadBoy
BadBoy_Fixed
Result after call Test01:
The property value "1" does not equal the baseline value "0". 11:10:29 Normal
The property value "1" equals the baseline value "1". 11:10:40 Normal
CompareResult: BadBoy_Fixed 11:10:50 Normal
The property value "1" equals the baseline value "1". 11:10:50 Normal