From ea06dfbcd5d7617039d6422d32ef235dfab68c85 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 7 Aug 2019 11:30:16 -0400
Subject: [PATCH] add tests for casting and range in macro processor

---
 tests/example1_macro.mod | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/example1_macro.mod b/tests/example1_macro.mod
index f31b6e7d93..9173e07eb8 100644
--- a/tests/example1_macro.mod
+++ b/tests/example1_macro.mod
@@ -191,5 +191,13 @@ stoch_simul;
 @#error "Numeric comparison incorrect"
 @#endif
 
+@#if ([1] + (array)(real) "2") != [1, 2]
+@#error "Cast error"
+@#endif
+
+@#if -3:-1.5:3 != [] || 3:-1:-0.1 != [3, 2, 1, 0]
+@#error "Range error"
+@#endif
+
 @#echomacrovars(save)
-@#echomacrovars
\ No newline at end of file
+@#echomacrovars
-- 
GitLab