Sfoglia il codice sorgente

+ test for issue #27744

git-svn-id: trunk@34790 -
florian 8 anni fa
parent
commit
8bbd2e4030
2 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. 1 0
      .gitattributes
  2. 19 0
      tests/webtbs/tw27744.pp

+ 1 - 0
.gitattributes

@@ -15057,6 +15057,7 @@ tests/webtbs/tw2767.pp svneol=native#text/plain
 tests/webtbs/tw27691.pp svneol=native#text/plain
 tests/webtbs/tw2771.pp svneol=native#text/plain
 tests/webtbs/tw2772.pp svneol=native#text/plain
+tests/webtbs/tw27744.pp svneol=native#text/pascal
 tests/webtbs/tw27750a.pp svneol=native#text/pascal
 tests/webtbs/tw27750b.pp svneol=native#text/pascal
 tests/webtbs/tw2776.pp svneol=native#text/plain

+ 19 - 0
tests/webtbs/tw27744.pp

@@ -0,0 +1,19 @@
+{ %opt=-Oodfa -Sew }
+{$mode objfpc}
+
+type
+  tarr = array of longint;
+var
+  a: array of longint;
+
+function IndexOfValue(const a: tarr; l: longint): longint;
+begin
+  for result:=low(a) to high(a) do
+    if a[result]=l then
+      exit;
+  result:=-1;
+end;
+
+begin
+end.
+