about summary refs log tree commit diff stats
path: root/subx/040---tests.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-18 00:00:18 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-18 00:45:12 -0700
commit83c67014034bbf9072d7e4555b0e51e815a95756 (patch)
treecf52127783efc20bbe8d903d96e73bc51a1f752d /subx/040---tests.cc
parent4b506b630ce28b3574a9f903904588f92dd3a1c1 (diff)
downloadmu-83c67014034bbf9072d7e4555b0e51e815a95756.tar.gz
switch to new syntax for segment headers in C++
Diffstat (limited to 'subx/040---tests.cc')
-rw-r--r--subx/040---tests.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/040---tests.cc b/subx/040---tests.cc
index e5949bbd..af05bff3 100644
--- a/subx/040---tests.cc
+++ b/subx/040---tests.cc
@@ -19,7 +19,7 @@ void test_run_test() {
   Mem.push_back(vma(0xbd000000));  // manually allocate memory
   Reg[ESP].u = 0xbd000100;
   run(
-      "== 0x1\n"  // code segment
+      "== code 0x1\n"  // code segment
       "main:\n"
       "  e8/call run-tests/disp32\n"  // 5 bytes
       "  f4/halt\n"                   // 1 byte
@@ -35,7 +35,7 @@ void test_run_test() {
 
 void create_test_function(program& p) {
   if (p.segments.empty()) return;
-  segment& code = p.segments.at(0);
+  segment& code = *find(p, "code");
   trace(3, "transform") << "-- create 'run-tests'" << end();
   vector<line> new_insts;
   for (int i = 0;  i < SIZE(code.lines);  ++i) {