about summary refs log tree commit diff stats
path: root/075scenario_keyboard.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-12 13:10:23 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-12 17:00:19 -0700
commit3663ca6c2d4c42c4a7bf6af4b2edf71dd8d10dd7 (patch)
tree330d04974b9d30bff1b16adc8d14a3d9fd77643d /075scenario_keyboard.cc
parenta70d593dfb8eea87a898a69adeb9689a21199edf (diff)
downloadmu-3663ca6c2d4c42c4a7bf6af4b2edf71dd8d10dd7.tar.gz
1356 - snapshot #2: floating point support
I added one test to check that divide can return a float, then hacked at
the rippling failures across the entire entire codebase until all tests
pass. Now I need to look at the changes I made and see if there's a
system to them, identify other places that I missed, and figure out the
best way to cover all cases. I also need to show real rather than
encoded values in the traces, but I can't use value() inside reagent
methods because of the name clash with the member variable. So let's
take a snapshot before we attempt any refactoring. This was non-trivial
to get right.

Even if I convince myself that I've gotten it right, I might back this
all out if I can't easily *persuade others* that I've gotten it right.
Diffstat (limited to '075scenario_keyboard.cc')
-rw-r--r--075scenario_keyboard.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/075scenario_keyboard.cc b/075scenario_keyboard.cc
index 0de6a2eb..3d816c2a 100644
--- a/075scenario_keyboard.cc
+++ b/075scenario_keyboard.cc
@@ -41,15 +41,15 @@ if (curr.name == "assume-keyboard") {
   curr.operation = Recipe_number["new"];
   assert(curr.products.empty());
   curr.products.push_back(reagent("keyboard:address"));
-  curr.products.at(0).set_value(KEYBOARD);
+  curr.products.at(0).set_value(mu_integer(KEYBOARD));  // address must be a positive integer
   result.steps.push_back(curr);  // hacky that "Rewrite Instruction" is converting to multiple instructions
   // leave second instruction in curr
   curr.clear();
   curr.operation = Recipe_number["init-fake-keyboard"];
   assert(curr.ingredients.empty());
   curr.ingredients.push_back(reagent("keyboard:address"));
-  curr.ingredients.at(0).set_value(KEYBOARD);
+  curr.ingredients.at(0).set_value(mu_integer(KEYBOARD));  // address must be a positive integer
   assert(curr.products.empty());
   curr.products.push_back(reagent("keyboard:address"));
-  curr.products.at(0).set_value(KEYBOARD);
+  curr.products.at(0).set_value(mu_integer(KEYBOARD));  // address must be a positive integer
 }