From 8fa439e64dc6913cc2f4d5d3f2a3f261bc70257e Mon Sep 17 00:00:00 2001 From: Sven/Sarah Barth Date: Fri, 8 Sep 2023 15:23:55 +0200 Subject: [PATCH] + add some tests for hint directives in context of arrays (both with the element and the index) that check that the hint is indeed generated --- tests/test/thintdir3a.pp | 17 +++++++++++++++++ tests/test/thintdir3b.pp | 17 +++++++++++++++++ tests/test/thintdir4a.pp | 15 +++++++++++++++ tests/test/thintdir4b.pp | 15 +++++++++++++++ tests/test/thintdir5.pp | 15 +++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 tests/test/thintdir3a.pp create mode 100644 tests/test/thintdir3b.pp create mode 100644 tests/test/thintdir4a.pp create mode 100644 tests/test/thintdir4b.pp create mode 100644 tests/test/thintdir5.pp diff --git a/tests/test/thintdir3a.pp b/tests/test/thintdir3a.pp new file mode 100644 index 0000000000..a7d8f25cab --- /dev/null +++ b/tests/test/thintdir3a.pp @@ -0,0 +1,17 @@ +{ %FAIL } + +program thintdir3a; + +{$mode objfpc} +{$warn 5043 error} + +type + TTest = 1..9 deprecated; + + TRec = record + f: array of TTest; + end; + +begin + +end. diff --git a/tests/test/thintdir3b.pp b/tests/test/thintdir3b.pp new file mode 100644 index 0000000000..3629e8b04a --- /dev/null +++ b/tests/test/thintdir3b.pp @@ -0,0 +1,17 @@ +{ %FAIL } + +program thintdir3b; + +{$mode objfpc} +{$warn 5043 error} + +type + TTest = 1..9 deprecated; + + TRec = record + f: array of array of TTest; + end; + +begin + +end. diff --git a/tests/test/thintdir4a.pp b/tests/test/thintdir4a.pp new file mode 100644 index 0000000000..dde64b82e5 --- /dev/null +++ b/tests/test/thintdir4a.pp @@ -0,0 +1,15 @@ +{ %FAIL } + +program thintdir4a; + +{$mode objfpc} +{$warn 5043 error} + +type + TTest = 1..9 deprecated; + + TTestArray = array of TTest; + +begin + +end. diff --git a/tests/test/thintdir4b.pp b/tests/test/thintdir4b.pp new file mode 100644 index 0000000000..bce6c587d0 --- /dev/null +++ b/tests/test/thintdir4b.pp @@ -0,0 +1,15 @@ +{ %FAIL } + +program thintdir4b; + +{$mode objfpc} +{$warn 5043 error} + +type + TTest = 1..9 deprecated; + + TTestArray = array of array of TTest; + +begin + +end. diff --git a/tests/test/thintdir5.pp b/tests/test/thintdir5.pp new file mode 100644 index 0000000000..868b70cb02 --- /dev/null +++ b/tests/test/thintdir5.pp @@ -0,0 +1,15 @@ +{ %FAIL } + +program thintdir4a; + +{$mode objfpc} +{$warn 5043 error} + +type + TTest = 1..9 deprecated; + + TTestArray = array[TTest] of LongInt; + +begin + +end.