From 62a52ffbfe2880fe754732ca3417eab96ff83738 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 1 Jul 2015 10:19:04 -0700 Subject: 1690 --- html/072scenario_screen.cc.html | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'html/072scenario_screen.cc.html') diff --git a/html/072scenario_screen.cc.html b/html/072scenario_screen.cc.html index e436cfe6..f5210f0b 100644 --- a/html/072scenario_screen.cc.html +++ b/html/072scenario_screen.cc.html @@ -16,6 +16,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } .traceContains { color: #008000; } .cSpecial { color: #008000; } .Constant { color: #00a0a0; } +.traceAbsent { color: #c00000; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } .Special { color: #ff6060; } @@ -141,6 +142,16 @@ scenario screen-in-scenario-color [ :(before "End is_special_name Cases") if (s == "screen") return true; +:(scenarios run) +:(scenario convert_names_does_not_warn_when_mixing_special_names_and_numeric_locations) +% Hide_warnings = true; +recipe main [ + screen:number <- copy 1:number +] +-warn: mixing variable names and numeric addresses in main +$warn: 0 +:(scenarios run_mu_scenario) + :(before "End Globals") // Scenarios may not define default-space, so they should fit within the // initial area of memory reserved for tests. We'll put the predefined @@ -159,8 +170,8 @@ assert(Name[tmp_recipe.// Scenario Globals. const long long int SCREEN = Next_predefined_global_for_scenarios++; // End Scenario Globals. -:(before "End Predefined Scenario Locals In Run") -Name[tmp_recipe.at(0)]["screen"] = SCREEN; +:(before "End Special Scenario Variable Names(r)") +Name[r]["screen"] = SCREEN; :(before "End Rewrite Instruction(curr)") // rewrite `assume-screen width, height` to @@ -231,7 +242,9 @@ void check_screen(const string& expected_cont raw_string_stream cursor(expected_contents); // todo: too-long expected_contents should fail long long int addr = screen_data_start+1; // skip length +//? cerr << "screen height " << screen_height << '\n'; //? 1 for (long long int row = 0; row < screen_height; ++row) { +//? cerr << "row: " << row << '\n'; //? 1 cursor.skip_whitespace_and_comments(); if (cursor.at_end()) break; assert(cursor.get() == '.'); @@ -299,6 +312,8 @@ void check_screen(const string& expected_cont raw_string_stream::raw_string_stream(const string& backing) :index(0), max(backing.size()), buf(backing.c_str()) {} bool raw_string_stream::at_end() const { +//? cerr << index << ' ' << max << '\n'; //? 1 +//? cerr << buf << "$\n"; //? 1 if (index >= max) return true; if (tb_utf8_char_length(buf[index]) > max-index) { raise << "unicode string seems corrupted at index "<< index << " character " << static_cast<int>(buf[index]) << '\n'; @@ -363,6 +378,7 @@ void dump_screen() {1; // skip length for (long long int row = 0; row < screen_height; ++row) { //? cerr << curr << ":\n"; //? 2 + cerr << '.'; for (long long int col = 0; col < screen_width; ++col) { if (Memory[curr]) cerr << to_unicode(Memory[curr]); @@ -370,7 +386,7 @@ void dump_screen() {' '; curr += /*size of screen-cell*/2; } - cerr << '\n'; + cerr << ".\n"; } } -- cgit 1.4.1-2-gfad0