From 3f3aa08b28dba840b751d709c4c898e2bc023249 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 2 Mar 2007 08:57:21 +0000 Subject: [PATCH] * forgot to commit git-svn-id: trunk@6694 - --- .gitattributes | 1 + tests/test/trecreg4.pp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/test/trecreg4.pp diff --git a/.gitattributes b/.gitattributes index 92b01ac25e..ee83bf0262 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6813,6 +6813,7 @@ tests/test/trangeob.pp svneol=native#text/plain tests/test/trecreg.pp -text tests/test/trecreg2.pp svneol=native#text/plain tests/test/trecreg3.pp -text +tests/test/trecreg4.pp svneol=native#text/plain tests/test/tresstr.pp svneol=native#text/plain tests/test/trtti1.pp svneol=native#text/plain tests/test/trtti2.pp svneol=native#text/plain diff --git a/tests/test/trecreg4.pp b/tests/test/trecreg4.pp new file mode 100644 index 0000000000..de5eaf1428 --- /dev/null +++ b/tests/test/trecreg4.pp @@ -0,0 +1,30 @@ +{$bitpacking on} + +type + tr = packed record + b1, b2, b3, b4: -129..127; + end; + +procedure t; +var + r: tr; + l: longint; +begin + r.b4 := -5; + r.b3 := -128; + r.b2 := 127; + r.b1 := -1; + if (r.b1 <> -1) or + (r.b2 <> 127) or + (r.b3 <> -128) or + (r.b4 <> -5) then + begin + writeln('error'); + halt(1); + end; +end; + +begin + t; +end. +