poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[COMMITTED] testsuite: add a few tests for constructing arrays of string


From: Jose E. Marchesi
Subject: [COMMITTED] testsuite: add a few tests for constructing arrays of strings bounded by size
Date: Sun, 22 Jan 2023 05:38:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13)


2023-01-22  Jose E. Marchesi  <jemarch@gnu.org>

        * testsuite/poke.pkl/acons-20.pk: New test.
        * testsuite/poke.pkl/acons-21.pk: Likewise.
        * testsuite/poke.pkl/acons-22.pk: Likewise.
        * testsuite/Makefile.am (EXTRA_DIST): Add new tests.
---
 ChangeLog                      | 7 +++++++
 testsuite/Makefile.am          | 3 +++
 testsuite/poke.pkl/acons-20.pk | 4 ++++
 testsuite/poke.pkl/acons-21.pk | 4 ++++
 testsuite/poke.pkl/acons-22.pk | 4 ++++
 5 files changed, 22 insertions(+)
 create mode 100644 testsuite/poke.pkl/acons-20.pk
 create mode 100644 testsuite/poke.pkl/acons-21.pk
 create mode 100644 testsuite/poke.pkl/acons-22.pk

diff --git a/ChangeLog b/ChangeLog
index 0c112fc4..58f0df2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-01-22  Jose E. Marchesi  <jemarch@gnu.org>
+
+       * testsuite/poke.pkl/acons-20.pk: New test.
+       * testsuite/poke.pkl/acons-21.pk: Likewise.
+       * testsuite/poke.pkl/acons-22.pk: Likewise.
+       * testsuite/Makefile.am (EXTRA_DIST): Add new tests.
+
 2023-01-22  Jose E. Marchesi  <jemarch@termi>
 
        * libpoke/pkl-gen.pks (array_constructor): Support element types
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index c14818ea..f32046cd 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -665,6 +665,9 @@ EXTRA_DIST = \
   poke.pkl/acons-17.pk \
   poke.pkl/acons-18.pk \
   poke.pkl/acons-19.pk \
+  poke.pkl/acons-20.pk \
+  poke.pkl/acons-21.pk \
+  poke.pkl/acons-22.pk \
   poke.pkl/add-arrays-1.pk \
   poke.pkl/add-arrays-2.pk \
   poke.pkl/add-arrays-3.pk \
diff --git a/testsuite/poke.pkl/acons-20.pk b/testsuite/poke.pkl/acons-20.pk
new file mode 100644
index 00000000..539160a9
--- /dev/null
+++ b/testsuite/poke.pkl/acons-20.pk
@@ -0,0 +1,4 @@
+/* { dg-do run } */
+
+/* { dg-command {try string[3#B]("foo"); catch if E_constraint { print 
"caught\n"; } } } */
+/* { dg-output "caught" } */
diff --git a/testsuite/poke.pkl/acons-21.pk b/testsuite/poke.pkl/acons-21.pk
new file mode 100644
index 00000000..55e3e017
--- /dev/null
+++ b/testsuite/poke.pkl/acons-21.pk
@@ -0,0 +1,4 @@
+/* { dg-do run } */
+
+/* { dg-command {string[3#B]("")} } */
+/* { dg-output {\["","",""\]} } */
diff --git a/testsuite/poke.pkl/acons-22.pk b/testsuite/poke.pkl/acons-22.pk
new file mode 100644
index 00000000..dee2e6c4
--- /dev/null
+++ b/testsuite/poke.pkl/acons-22.pk
@@ -0,0 +1,4 @@
+/* { dg-do run } */
+
+/* { dg-command {string[8#B]("foo")} } */
+/* { dg-output {\["foo","foo"\]} } */
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]