Skip to content

Commit 77999e1

Browse files
Add tests for set_human_in_debug toggle state (#263)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 6f4194e commit 77999e1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

in-cli/src/in_lang_parse/lexer.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,21 @@ pub fn filter_top_level_in_decl_lines(source: &str) -> String {
330330
.collect::<Vec<_>>()
331331
.join("\n")
332332
}
333+
334+
#[cfg(test)]
335+
mod tests {
336+
use super::*;
337+
338+
#[test]
339+
fn test_human_in_debug_toggle() {
340+
let initial = human_in_debug();
341+
342+
set_human_in_debug(true);
343+
assert!(human_in_debug());
344+
345+
set_human_in_debug(false);
346+
assert!(!human_in_debug());
347+
348+
set_human_in_debug(initial);
349+
}
350+
}

0 commit comments

Comments
 (0)