From e9427342d58e872786145d43a2271df72093e1e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Mon, 16 Dec 2024 18:45:31 +0100
Subject: [PATCH] [region] test added

---
 src/plugins/region/tests/region/index.c                 | 5 +++++
 src/plugins/region/tests/region/oracle/index.res.oracle | 7 +++++++
 2 files changed, 12 insertions(+)
 create mode 100644 src/plugins/region/tests/region/index.c
 create mode 100644 src/plugins/region/tests/region/oracle/index.res.oracle

diff --git a/src/plugins/region/tests/region/index.c b/src/plugins/region/tests/region/index.c
new file mode 100644
index 00000000000..5727f89181b
--- /dev/null
+++ b/src/plugins/region/tests/region/index.c
@@ -0,0 +1,5 @@
+void f ( int k ) {
+  struct { int x,y,z[4]; } s ;
+  s.x = 1 ;
+  s.z [ k ] = 0;
+}
diff --git a/src/plugins/region/tests/region/oracle/index.res.oracle b/src/plugins/region/tests/region/oracle/index.res.oracle
new file mode 100644
index 00000000000..6d618bf3f0c
--- /dev/null
+++ b/src/plugins/region/tests/region/oracle/index.res.oracle
@@ -0,0 +1,7 @@
+[kernel] Parsing index.c (with preprocessing)
+[region] Analyzing regions
+[region] Function f:
+  R0007: R-- k (int) 32b ;
+  R0001: --- s 192b { .x: R0002; #32b; .z: R0005[4]; } ;
+  R0002: -W- (int) 32b ;
+  R0005: -W- (int) 32b ;
-- 
GitLab