From 2639d8f83a4f4351a404259015d2a8ecf9bb9512 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 18 Mar 2007 10:34:18 +0000 Subject: [PATCH] * big set test git-svn-id: trunk@6911 - --- .gitattributes | 1 + tests/test/tset6.pp | 339 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 tests/test/tset6.pp diff --git a/.gitattributes b/.gitattributes index 11bf2eee30..4acd3860f4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6848,6 +6848,7 @@ tests/test/tset3.pp svneol=native#text/plain tests/test/tset4.pp svneol=native#text/plain tests/test/tset5.pp svneol=native#text/plain tests/test/tset5a.pp svneol=native#text/plain +tests/test/tset6.pp svneol=native#text/plain tests/test/tstack.pp svneol=native#text/plain tests/test/tstprocv.pp svneol=native#text/plain tests/test/tstring1.pp svneol=native#text/plain diff --git a/tests/test/tset6.pp b/tests/test/tset6.pp new file mode 100644 index 0000000000..a92753feec --- /dev/null +++ b/tests/test/tset6.pp @@ -0,0 +1,339 @@ +{ %opt=-Ooregvar } + +{$ifdef fpc} +{$packset 1} +{$endif fpc} +{$z1} + +type + ta = set of 0..700; + tb = set of 0..1500; + tc = set of 0..2300; + td = set of 0..3100; + te = set of 0..12700; + +var + ve: te; + vd: td; + vc: tc; + vb: tb; + va: ta; + b1,b2,b3: byte; +begin + b1 := $ff; + b2 := $ff; + b3 := $ff; + va := []; + vb := []; + vc := []; + vd := []; + ve := []; + + va := [300..400]; + vb := va; + if b1 <> $ff then + halt(1); + if va <> [300..400] then + halt(1); + if vb <> [300..400] then + halt(1); + if vc <> [] then + halt(1); + if vd <> [] then + halt(1); + if ve <> [] then + halt(1); + vc := va; + if b1 <> $ff then + halt(1); + if va <> [300..400] then + halt(1); + if vb <> [300..400] then + halt(1); + if vc <> [300..400] then + halt(1); + if vd <> [] then + halt(1); + if ve <> [] then + halt(1); + vd := va; + if b1 <> $ff then + halt(1); + if va <> [300..400] then + halt(1); + if vb <> [300..400] then + halt(1); + if vc <> [300..400] then + halt(1); + if vd <> [300..400] then + halt(1); + if ve <> [] then + halt(1); + ve := va; + if b1 <> $ff then + halt(1); + if va <> [300..400] then + halt(1); + if vb <> [300..400] then + halt(1); + if vc <> [300..400] then + halt(1); + if vd <> [300..400] then + halt(1); + if ve <> [300..400] then + halt(1); + + b1 := $ff; + b2 := $ff; + b3 := $ff; + va := []; + vb := []; + vc := []; + vd := []; + ve := []; + + vb := [0,200,300]; + va := vb; + if b1 <> $ff then + halt(2); + if va <> [0,200,300] then + halt(2); + if vb <> [0,200,300] then + halt(2); + if vc <> [] then + halt(2); + if vd <> [] then + halt(2); + if ve <> [] then + halt(2); + vc := vb; + if b1 <> $ff then + halt(2); + if va <> [0,200,300] then + halt(2); + if vb <> [0,200,300] then + halt(2); + if vc <> [0,200,300] then + halt(2); + if vd <> [] then + halt(2); + if ve <> [] then + halt(2); + vd := vb; + if b1 <> $ff then + halt(2); + if va <> [0,200,300] then + halt(2); + if vb <> [0,200,300] then + halt(2); + if vc <> [0,200,300] then + halt(2); + if vd <> [0,200,300] then + halt(2); + if ve <> [] then + halt(2); + ve := vb; + if va <> [0,200,300] then + halt(2); + if vb <> [0,200,300] then + halt(2); + if vc <> [0,200,300] then + halt(2); + if vd <> [0,200,300] then + halt(2); + if ve <> [0,200,300] then + halt(2); + + + b1 := $ff; + b2 := $ff; + b3 := $ff; + va := []; + vb := []; + vc := []; + vd := []; + ve := []; + + vc := [500,600,700]; + va := vc; + if b1 <> $ff then + halt(3); + if va <> [500,600,700] then + halt(3); + if vc <> [500,600,700] then + halt(3); + if vb <> [] then + halt(3); + if vd <> [] then + halt(3); + if ve <> [] then + halt(3); + vb := vc; + if b1 <> $ff then + halt(3); + if va <> [500,600,700] then + halt(3); + if vb <> [500,600,700] then + halt(3); + if vc <> [500,600,700] then + halt(3); + if vd <> [] then + halt(3); + if ve <> [] then + halt(3); + vd := vc; + if b1 <> $ff then + halt(3); + if va <> [500,600,700] then + halt(3); + if vb <> [500,600,700] then + halt(3); + if vc <> [500,600,700] then + halt(3); + if vd <> [500,600,700] then + halt(3); + if ve <> [] then + halt(3); + ve := vc; + if b1 <> $ff then + halt(3); + if va <> [500,600,700] then + halt(3); + if vb <> [500,600,700] then + halt(3); + if vc <> [500,600,700] then + halt(3); + if vd <> [500,600,700] then + halt(3); + if ve <> [500,600,700] then + halt(3); + + + b1 := $ff; + b2 := $ff; + b3 := $ff; + va := []; + vb := []; + vc := []; + vd := []; + ve := []; + + vd := [100,300,500]; + va := vd; + if b1 <> $ff then + halt(4); + if va <> [100,300,500] then + halt(4); + if vd <> [100,300,500] then + halt(4); + if vc <> [] then + halt(4); + if vb <> [] then + halt(4); + if ve <> [] then + halt(4); + vb := vd; + if b1 <> $ff then + halt(4); + if va <> [100,300,500] then + halt(4); + if vb <> [100,300,500] then + halt(4); + if vd <> [100,300,500] then + halt(4); + if vc <> [] then + halt(4); + if ve <> [] then + halt(4); + vc := vd; + if b1 <> $ff then + halt(4); + if va <> [100,300,500] then + halt(4); + if vb <> [100,300,500] then + halt(4); + if vc <> [100,300,500] then + halt(4); + if vd <> [100,300,500] then + halt(4); + if ve <> [] then + halt(4); + ve := vd; + if b1 <> $ff then + halt(4); + if va <> [100,300,500] then + halt(4); + if vb <> [100,300,500] then + halt(4); + if vc <> [100,300,500] then + halt(4); + if vd <> [100,300,500] then + halt(4); + if ve <> [100,300,500] then + halt(4); + + + b1 := $ff; + b2 := $ff; + b3 := $ff; + va := []; + vb := []; + vc := []; + vd := []; + ve := []; + + ve := [0,700]; + va := ve; + if b1 <> $ff then + halt(5); + if va <> [0,700] then + halt(5); + if ve <> [0,700] then + halt(5); + if vc <> [] then + halt(5); + if vd <> [] then + halt(5); + if vb <> [] then + halt(5); + vb := ve; + if b1 <> $ff then + halt(5); + if va <> [0,700] then + halt(5); + if vb <> [0,700] then + halt(5); + if ve <> [0,700] then + halt(5); + if vd <> [] then + halt(5); + if vc <> [] then + halt(5); + vc := ve; + if b1 <> $ff then + halt(5); + if va <> [0,700] then + halt(5); + if vb <> [0,700] then + halt(5); + if vc <> [0,700] then + halt(5); + if ve <> [0,700] then + halt(5); + if vd <> [] then + halt(5); + vd := ve; + if b1 <> $ff then + halt(5); + if va <> [0,700] then + halt(5); + if vb <> [0,700] then + halt(5); + if vc <> [0,700] then + halt(5); + if vd <> [0,700] then + halt(5); + if ve <> [0,700] then + halt(5); + writeln('ok'); +end.