about summary refs log tree commit diff stats
path: root/050scenario.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-21 09:26:30 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-21 09:27:25 -0800
commit167d0ca0d62f46598ea7385a11fa64ec935b5269 (patch)
tree8d6031f7fa1830ccdf71d391aeec1e35d4966c32 /050scenario.cc
parentfe9f07155abf6e5326d0e27c1b367181f0fcbfa8 (diff)
downloadmu-167d0ca0d62f46598ea7385a11fa64ec935b5269.tar.gz
2466 - eliminate ':string' from scenarios
Diffstat (limited to '050scenario.cc')
-rw-r--r--050scenario.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/050scenario.cc b/050scenario.cc
index 9f4c5c86..6b785d5c 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -309,7 +309,10 @@ void check_memory(const string& s) {
 
 void check_type(const string& lhs, istream& in) {
   reagent x(lhs);
-  if (x.properties.at(0).second->value == "string") {
+  const string_tree* type_name = x.properties.at(0).second;
+  if (type_name->value == "array"
+      && type_name->right && type_name->right->value == "character"
+      && !type_name->right->right) {
     x.set_value(to_integer(x.name));
     skip_whitespace_and_comments(in);
     string _assign = next_word(in);
@@ -380,7 +383,7 @@ recipe main [
   3:number <- copy 98  # 'b'
   4:number <- copy 99  # 'c'
   memory-should-contain [
-    1:string <- [ab]
+    1:array:character <- [ab]
   ]
 ]
 +error: expected location 1 to contain length 2 of string [ab] but saw 3
@@ -392,7 +395,7 @@ recipe main [
   3:number <- copy 98  # 'b'
   4:number <- copy 99  # 'c'
   memory-should-contain [
-    1:string <- [abc]
+    1:array:character <- [abc]
   ]
 ]
 +run: checking string length at 1