about summary refs log tree commit diff stats
path: root/058shape_shifting_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-19 09:45:06 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-19 09:45:55 -0800
commit452086e35b7da0c6fadb6d3b382470bbf0a910b3 (patch)
tree99560d57b98578bd9f65774456eb9c588ef05e43 /058shape_shifting_container.cc
parentf3b504bc058162ec7f46280263fbd8bf72175f50 (diff)
downloadmu-452086e35b7da0c6fadb6d3b382470bbf0a910b3.tar.gz
2682
New test after yesterday's changes already passing, which helps me gain
some confidence.

There's some redundancy in the shape_shifting_container layer. I'm
probably testing the same things at the level of element_type(), MERGE,
and GET..
Diffstat (limited to '058shape_shifting_container.cc')
-rw-r--r--058shape_shifting_container.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/058shape_shifting_container.cc b/058shape_shifting_container.cc
index a49b8a0e..1a8d8ccf 100644
--- a/058shape_shifting_container.cc
+++ b/058shape_shifting_container.cc
@@ -210,6 +210,19 @@ recipe main [
 ]
 +mem: storing 17 in location 2
 
+:(scenario get_on_complex_shape_shifting_container)
+container foo:_a:_b [
+  x:_a
+  y:_b
+]
+recipe main [
+  1:address:shared:array:character <- new [abc]
+  {2: (foo number (address shared array character))} <- merge 34/x, 1:address:shared:array:character/y
+  3:address:shared:array:character <- get {2: (foo number (address shared array character))}, y:offset
+  4:boolean <- equal 1:address:shared:array:character, 3:address:shared:array:character
+]
++mem: storing 1 in location 4
+
 :(before "End element_type Special-cases")
 if (contains_type_ingredient(element)) {
   if (!canonized_base.type->right)