Browse Source

+ added test for the div/mod bug fixed in r24247

git-svn-id: trunk@25212 -
nickysn 12 years ago
parent
commit
a8729ca784
2 changed files with 24 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 23 0
      tests/tbs/tb0598.pp

+ 1 - 0
.gitattributes

@@ -9975,6 +9975,7 @@ tests/tbs/tb0594.pp svneol=native#text/plain
 tests/tbs/tb0595.pp svneol=native#text/plain
 tests/tbs/tb0596.pp svneol=native#text/pascal
 tests/tbs/tb0597.pp svneol=native#text/plain
+tests/tbs/tb0598.pp svneol=native#text/plain
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/tbs0594.pp svneol=native#text/pascal
 tests/tbs/ub0060.pp svneol=native#text/plain

+ 23 - 0
tests/tbs/tb0598.pp

@@ -0,0 +1,23 @@
+
+program tb0598;
+
+{$R-}
+
+var
+  a: Cardinal;
+  b: QWord;
+  c1, c2: QWord;
+begin
+  a := 1000000;
+  b := 10000000000000000000;
+  c1 := b div a;
+  c2 := 10000000000000000000 div a;
+  Write(c1, ' = ', c2, ': ');
+  if (c1 <> c2) or (c2 <> 10000000000000) then
+  begin
+    Writeln('FAIL');
+    halt(1);
+  end
+  else
+    Writeln('OK');
+end.