Consolidate mono test behavior in debug and release modes

Makes sure that we turn on `debug-symbols` in mono tests, and that this
feature is fully respected in symbol generation, so that output in
release + debug builds are the same.

Closes #4435
This commit is contained in:
Ayaz Hafiz 2022-11-01 18:31:32 -05:00
parent c4016547af
commit 204ac2f8b4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
61 changed files with 1303 additions and 1319 deletions

View file

@ -143,7 +143,6 @@ fn compiles_to_ir(test_name: &str, src: &str) {
verify_procedures(test_name, layout_interner, procedures, main_fn_symbol);
}
#[cfg(debug_assertions)]
fn verify_procedures<'a>(
test_name: &str,
interner: STLayoutInterner<'a>,
@ -201,19 +200,6 @@ fn verify_procedures<'a>(
}
}
// NOTE because the Show instance of module names is different in --release mode,
// these tests would all fail. In the future, when we do interesting optimizations,
// we'll likely want some tests for --release too.
#[cfg(not(debug_assertions))]
fn verify_procedures(
_expected: &str,
_interner: STLayoutInterner<'_>,
_procedures: MutMap<(Symbol, ProcLayout<'_>), Proc<'_>>,
_main_fn_symbol: Symbol,
) {
// Do nothing
}
#[mono_test]
fn ir_int_literal() {
r#"