+ test for already fixed mantis 11053

git-svn-id: trunk@10636 -
This commit is contained in:
Jonas Maebe 2008-04-12 17:47:12 +00:00
parent 3dc94e678d
commit 668d1283a9
2 changed files with 58 additions and 0 deletions

1
.gitattributes vendored
View File

@ -8133,6 +8133,7 @@ tests/webtbs/tw11039a.pp svneol=native#text/plain
tests/webtbs/tw11039b.pp svneol=native#text/plain
tests/webtbs/tw1104.pp svneol=native#text/plain
tests/webtbs/tw11042.pp svneol=native#text/plain
tests/webtbs/tw11053.pp svneol=native#text/plain
tests/webtbs/tw1111.pp svneol=native#text/plain
tests/webtbs/tw1117.pp svneol=native#text/plain
tests/webtbs/tw1122.pp svneol=native#text/plain

57
tests/webtbs/tw11053.pp Normal file
View File

@ -0,0 +1,57 @@
program Project1;
{$mode delphi}
const height = 1;
width = 1;
var pix: array [0..height-1,0..width-1] of Integer;
procedure Main;
var
dx, dy: Integer;
Color, digest: cardinal;
cx, cy, zx, zy: Double;
scale: Double;
deep: Integer;
begin
FillChar(pix, SizeOf(pix), $f0);
scale := 0.05;
deep := 30;
Digest := 0;
for dy := 0 to height -1 do
begin
cy := (dy - height / 2) * scale;
for dx := 0 to width - 1 do
begin
color := 0;
cx := (dx - width / 2) * scale;
zx := cx;
zy := cy;
while zx * zx + zy * zy < 1 do
begin
zx := zx * zx - zy * zy + cx;
zy := 2 * zx * zy + cy;
Inc( color );
if color > Cardinal(deep) then break;
end;
pix[ dy, dx ] := color;
end;
end;
pix[ 0, 0 ] := 80;
Digest := 0;
for dy := 0 to height -1 do for dx := 0 to width - 1 do Digest := Digest + pix[dy, dx];
if (digest<>80) then
halt(1);
end;
begin
Main;
end.