From 8d47a46c89ed49b1e2cfa462dae9ebb28b14b26f Mon Sep 17 00:00:00 2001 From: Jade Alglave Date: Fri, 31 May 2024 09:50:40 +0100 Subject: [PATCH] more work on tests --- asllib/tests/language.t/Iyhrp-2.asl | 16 ++++++++++++++++ asllib/tests/language.t/Iyhrp.asl | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 asllib/tests/language.t/Iyhrp-2.asl diff --git a/asllib/tests/language.t/Iyhrp-2.asl b/asllib/tests/language.t/Iyhrp-2.asl new file mode 100644 index 0000000000..03153f641d --- /dev/null +++ b/asllib/tests/language.t/Iyhrp-2.asl @@ -0,0 +1,16 @@ +//I_YHRP: IYHRP The calculation of constraints shall cause an error if +//necessary, for example where a division by zero occurs, etc. + +func helloworld(y : bits(2)) +begin + // x = { 8, 16, 32, 64} + // y = {00, 01, 10, 11} + var x = 8 << UInt(y); + var zz = x DIV 16; + var xyz = 100 MOD zz; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyhrp.asl b/asllib/tests/language.t/Iyhrp.asl index 3e7ce74c44..43ccdcd3ee 100644 --- a/asllib/tests/language.t/Iyhrp.asl +++ b/asllib/tests/language.t/Iyhrp.asl @@ -1,3 +1,6 @@ +//I_YHRP: IYHRP The calculation of constraints shall cause an error if +//necessary, for example where a division by zero occurs, etc. + // RUN: not interp %s | FileCheck %s func f(x: integer {2, 4}, y: integer {-1..1})