about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-05 10:13:50 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-05 10:16:29 -0700
commitba2983e000c97314a95eb2719a52816add4249b7 (patch)
tree899db6cbc4bdf655dcee4b2c58cd822681dccf83
parent6a49ea24d15bce8ca15e2f11160e8256ce43c8af (diff)
downloadmu-ba2983e000c97314a95eb2719a52816add4249b7.tar.gz
4489
The current approach to warnings is workable. We'll just never print
warnings to the screen in tests. In tests you can do whatever you want.
This is simpler than messing with levels of warnings.
-rw-r--r--subx/003trace.cc3
-rw-r--r--subx/034discourage_raw_hex.cc1
2 files changed, 3 insertions, 1 deletions
diff --git a/subx/003trace.cc b/subx/003trace.cc
index 92f198fc..1aead5a6 100644
--- a/subx/003trace.cc
+++ b/subx/003trace.cc
@@ -184,6 +184,9 @@ Hide_errors = false;
 Hide_warnings = false;
 Dump_trace = false;
 Dump_label = "";
+//: Never dump warnings in scenarios
+:(before "End Test Setup")
+Hide_warnings = true;
 
 :(before "End Includes")
 #define CLEAR_TRACE  delete Trace_stream, Trace_stream = new trace_stream;
diff --git a/subx/034discourage_raw_hex.cc b/subx/034discourage_raw_hex.cc
index 22f45b1d..cb097443 100644
--- a/subx/034discourage_raw_hex.cc
+++ b/subx/034discourage_raw_hex.cc
@@ -21,7 +21,6 @@ void warn_on_raw_jumps(/*const*/ program& p) {
 }
 
 :(scenario warn_on_hex_bytes_without_operands)
-% Hide_warnings = true;
 == 0x1
 bb 2a 00 00 00  # copy 0x2a (42) to EBX
 +warn: 'bb 2a 00 00 00': using raw hex is not recommended