@@ -66,6 +66,7 @@ SCENARIO("Constructing write stacks",
6666 THEN("The constructed stack should be &x")
6767 {
6868 auto stack=write_stackt(in_expr, environment, ns);
69+ REQUIRE_FALSE(stack.is_top_value());
6970 const exprt &out_expr=stack.to_expression();
7071
7172 CAPTURE(expr2c(out_expr, ns));
@@ -88,6 +89,7 @@ SCENARIO("Constructing write stacks",
8889 THEN("The constructed stack should be &a[0]")
8990 {
9091 auto stack=write_stackt(in_expr, environment, ns);
92+ REQUIRE_FALSE(stack.is_top_value());
9193 const exprt &out_expr=stack.to_expression();
9294
9395 CAPTURE(expr2c(out_expr, ns));
@@ -105,6 +107,7 @@ SCENARIO("Constructing write stacks",
105107 THEN("The constructed stack should be &a")
106108 {
107109 auto stack=write_stackt(in_expr, environment, ns);
110+ REQUIRE_FALSE(stack.is_top_value());
108111 const exprt &out_expr=stack.to_expression();
109112
110113 CAPTURE(expr2c(out_expr, ns));
@@ -122,6 +125,7 @@ SCENARIO("Constructing write stacks",
122125 THEN("The constructed stack should be &a[0]")
123126 {
124127 auto stack=write_stackt(in_expr, environment, ns);
128+ REQUIRE_FALSE(stack.is_top_value());
125129 const exprt &out_expr=stack.to_expression();
126130
127131 CAPTURE(expr2c(out_expr, ns));
@@ -141,6 +145,7 @@ SCENARIO("Constructing write stacks",
141145 THEN("The constructed stack should be &a[1]")
142146 {
143147 auto stack=write_stackt(in_expr, environment, ns);
148+ REQUIRE_FALSE(stack.is_top_value());
144149 const exprt &out_expr=stack.to_expression();
145150
146151 CAPTURE(expr2c(out_expr, ns));
@@ -159,6 +164,7 @@ SCENARIO("Constructing write stacks",
159164 THEN("The constructed stack should be &a[1]")
160165 {
161166 auto stack=write_stackt(in_expr, environment, ns);
167+ REQUIRE_FALSE(stack.is_top_value());
162168 const exprt &out_expr=stack.to_expression();
163169
164170 CAPTURE(expr2c(out_expr, ns));
@@ -178,6 +184,7 @@ SCENARIO("Constructing write stacks",
178184 THEN("The constructed stack should be &a[2]")
179185 {
180186 auto stack=write_stackt(in_expr, environment, ns);
187+ REQUIRE_FALSE(stack.is_top_value());
181188 const exprt &out_expr=stack.to_expression();
182189
183190 CAPTURE(expr2c(out_expr, ns));
@@ -197,6 +204,7 @@ SCENARIO("Constructing write stacks",
197204 THEN("The constructed stack should be &a[0]")
198205 {
199206 auto stack=write_stackt(in_expr, environment, ns);
207+ REQUIRE_FALSE(stack.is_top_value());
200208 const exprt &out_expr=stack.to_expression();
201209
202210 CAPTURE(expr2c(out_expr, ns));
@@ -216,6 +224,7 @@ SCENARIO("Constructing write stacks",
216224 THEN("The constructed stack should be &a[2]")
217225 {
218226 auto stack=write_stackt(in_expr, environment, ns);
227+ REQUIRE_FALSE(stack.is_top_value());
219228 const exprt &out_expr=stack.to_expression();
220229
221230 CAPTURE(expr2c(out_expr, ns));
@@ -241,6 +250,7 @@ SCENARIO("Constructing write stacks",
241250 THEN("The constructed stack should be &a[TOP]")
242251 {
243252 auto stack=write_stackt(in_expr, environment, ns);
253+ REQUIRE_FALSE(stack.is_top_value());
244254 const exprt &out_expr=stack.to_expression();
245255
246256 CAPTURE(expr2c(out_expr, ns));
@@ -267,6 +277,7 @@ SCENARIO("Constructing write stacks",
267277 THEN("The constructed stack should be &a[2]")
268278 {
269279 auto stack=write_stackt(in_expr, environment, ns);
280+ REQUIRE_FALSE(stack.is_top_value());
270281 const exprt &out_expr=stack.to_expression();
271282
272283 CAPTURE(expr2c(out_expr, ns));
@@ -310,6 +321,7 @@ SCENARIO("Constructing write stacks",
310321 THEN("The constructed stack should be &s.comp")
311322 {
312323 auto stack=write_stackt(in_expr, environment, ns);
324+ REQUIRE_FALSE(stack.is_top_value());
313325 const exprt &out_expr=stack.to_expression();
314326
315327 CAPTURE(expr2c(out_expr, ns));
@@ -329,6 +341,7 @@ SCENARIO("Constructing write stacks",
329341 THEN("The constructed stack should be &s.comp2")
330342 {
331343 auto stack=write_stackt(in_expr, environment, ns);
344+ REQUIRE_FALSE(stack.is_top_value());
332345 const exprt &out_expr=stack.to_expression();
333346
334347 CAPTURE(expr2c(out_expr, ns));
@@ -386,6 +399,7 @@ SCENARIO("Constructing write stacks",
386399 THEN("The constructed stack should be &arr_s[1].comp")
387400 {
388401 auto stack=write_stackt(in_expr, environment, ns);
402+ REQUIRE_FALSE(stack.is_top_value());
389403 const exprt &out_expr=stack.to_expression();
390404
391405 CAPTURE(expr2c(out_expr, ns));
@@ -426,6 +440,7 @@ SCENARIO("Constructing write stacks",
426440 THEN("The constructed stack should be &arr_s[TOP].comp")
427441 {
428442 auto stack=write_stackt(in_expr, environment, ns);
443+ REQUIRE_FALSE(stack.is_top_value());
429444 const exprt &out_expr=stack.to_expression();
430445
431446 CAPTURE(expr2c(out_expr, ns));
0 commit comments