[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] testuite: fix dg-output strings for constraint exceptions
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] testuite: fix dg-output strings for constraint exceptions |
Date: |
Mon, 02 Jan 2023 13:37:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Mohammad.
> 2023-01-01 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * testsuite/poke.map/maps-structs-constraints-2.pk: Fix expected
> string.
> * testsuite/poke.map/maps-structs-constraints-3.pk: Likewise.
> * testsuite/poke.pkl/scons-constraints-1.pk: Likewise.
> * testsuite/poke.pkl/scons-constraints-2.pk: Likewise.
> ---
>
> Hello Jose and poke people!
>
> Happy New Year!
Happy gnu year mate.
>
> This is weird that we had this problem since Dec 10. Why the buildbot
> didn't catch this?
The tests are correct. The commit:
commit 6c0a476085476418a5708cb61e9165657d38803a
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Sat Dec 10 15:32:17 2022 +0100
pkl: add failed constraint expression source code to E_constraint
exceptions
Added this new handler for constraint failures to the runtime:
+immutable fun _pkl_e_constraint_msg = (string fname, string code) string:
+{
+ var msg = "";
+
+ if (code != "")
+ {
+ msg += "failed expression\n ";
+ for (c in code)
+ msg += (c == '\n') ? "\n " : c as string;
+ }
+
+ if (fname != "")
+ msg += "\nin field " + fname;
+
+ return msg;
+}
Could it be that you are running an old version of poke?
- Re: [PATCH] testuite: fix dg-output strings for constraint exceptions,
Jose E. Marchesi <=