Browse Source

* fixed dyn. array to variant array conversion for one dimensional arrays

git-svn-id: trunk@1603 -
florian 20 years ago
parent
commit
aec1b6dc4a
2 changed files with 25 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 24 0
      tests/test/testv9.pp

+ 1 - 0
.gitattributes

@@ -5297,6 +5297,7 @@ tests/test/testv5.pp svneol=native#text/plain
 tests/test/testv6.pp svneol=native#text/plain
 tests/test/testv7.pp svneol=native#text/plain
 tests/test/testv8.pp svneol=native#text/plain
+tests/test/testv9.pp svneol=native#text/plain
 tests/test/texception1.pp svneol=native#text/plain
 tests/test/texception10.pp svneol=native#text/plain
 tests/test/texception2.pp svneol=native#text/plain

+ 24 - 0
tests/test/testv9.pp

@@ -0,0 +1,24 @@
+{$mode objfpc}
+uses
+  Variants;
+
+var
+  a : array of longint;
+  a2 : array of array of longint;
+  v : variant;
+  i : longint;
+begin
+  setlength(a,1000);
+  for i:=0 to high(a) do
+    a[i]:=i;
+  v:=a;
+  for i:=0 to high(a) do
+    if v[i]<>i then
+      begin
+        writeln('v[',i,']=',v[i]);
+        halt(1);
+      end;
+  writeln('simple test ok');
+
+  setlength(a2,10,30);
+end.