about summary refs log tree commit diff stats
path: root/cpp/relayout
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-05 21:17:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-05 21:17:24 -0700
commitb96af395b9af2ff9df94b3e82213171f30827c8d (patch)
tree17c8c12648ccc25625e2534ec8d74fbe8f1542cc /cpp/relayout
parent2e3b597fe85b654e82b891c22d50754fa5a26156 (diff)
downloadmu-b96af395b9af2ff9df94b3e82213171f30827c8d.tar.gz
1276 - make C++ version the default
I've tried to update the Readme, but there are at least a couple of issues.
Diffstat (limited to 'cpp/relayout')
-rwxr-xr-xcpp/relayout64
1 files changed, 0 insertions, 64 deletions
diff --git a/cpp/relayout b/cpp/relayout
deleted file mode 100755
index e5f9a164..00000000
--- a/cpp/relayout
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env zsh
-# Helper to change the numerical prefixes across the repo, say if you want to
-# create room between 023 and 024, and so on.
-#
-# Assumes there's only ever one file with any numeric prefix. If you move
-# 003trace.tests you might need to do some manual patch-up.
-
-setopt extendedglob
-
-if [[ $# -eq 0 && `git diff HEAD |wc -l` -gt 0 ]]
-then
-  echo "Uncommitted changes"
-  exit
-fi
-
-if [[ $# -gt 0 ]] # dry run
-then
-  git() {
-    echo $*
-  }
-fi
-
-#
-
-index=0
-ls [0-9]* |grep -v "trace.test" |sort -n |
-  while read file
-  do
-    echo $file >&2
-    while [[ $file != `printf "%03d" $index`* ]]
-    do
-      echo
-      index=$(($index+1))
-    done
-    echo $file
-    index=$(($index+1))
-  done > .layout
-
-vim -c "set nu" .layout
-
-#
-
-root() {
-  echo $1 |perl -pwe 's/^[0-9]*//'
-}
-
-index=0
-cat .layout |
-  while read file
-  do
-    if [ ! -z $file ]
-    then
-      newfile=`printf "%03d" $index``root $file`
-      if [[ $newfile != $file ]]
-      then
-        git mv $file $newfile
-      fi
-    fi
-    index=$(($index+1))
-  done
-
-#
-
-rm .layout
#008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# tests for 'scenario' in previous layer

scenario first_scenario_in_mu [
  run [
    1:number <- add 2, 2
  ]
  memory-should-contain [
    1 <- 4
  ]
]

scenario scenario_with_comment_in_mu [
  run [
    # comment
    1:number <- add 2, 2
  ]
  memory-should-contain [
    1 <- 4
  ]
]

scenario scenario_with_multiple_comments_in_mu [
  run [
    # comment1
    # comment2
    1:number <- add 2, 2
  ]
  memory-should-contain [
    1 <- 4
  ]
]

scenario check_string_in_memory [
  run [
    1:number <- copy 3
    2:character <- copy 97  # 'a'
    3:character <- copy 98  # 'b'
    4:character <- copy 99  # 'c'
  ]
  memory-should-contain [
    1:string <- [abc]
  ]
]

scenario check_trace [
  run [
    1:number <- add 2, 2
  ]
  trace-should-contain [
    mem: storing 4 in location 1
  ]
]

scenario check_trace_negative [
  run [
    1:number <- add 2, 2
  ]
  trace-should-not-contain [
    mem: storing 5 in location 1
  ]
]

scenario check_trace_instruction [
  run [
    trace 1, [foo], [aaa]
  ]
  trace-should-contain [
    foo: aaa
  ]
]