Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/tsv_lang/src/doc/arena_render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,8 @@ mod column_arithmetic_tests {
//! flagged each arm below as an unasserted survivor; corruption-verify any
//! change here by breaking the arm and watching exactly one assertion fail.
use super::RenderConfig;
#[cfg(feature = "comment_check")]
use super::RenderPurpose;
use super::{
RenderIndent, effective_suffix_width, indent_str_width, indent_width, line_start_column,
update_pos_for_text,
Expand Down Expand Up @@ -1261,7 +1263,8 @@ mod column_arithmetic_tests {
RenderConfig {
print_width: 100,
indent,
..RenderConfig::default()
#[cfg(feature = "comment_check")]
purpose: RenderPurpose::Output,
}
}

Expand Down
14 changes: 10 additions & 4 deletions crates/tsv_lang/src/doc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ mod arena_tests {
use super::arena::{DocArena, DocId};
use super::arena_render::arena_print_doc_with_indent_and_render;
use super::render_config::RenderConfig;
#[cfg(feature = "comment_check")]
use super::render_config::RenderPurpose;
use super::*;
use crate::EmbedContext;

Expand Down Expand Up @@ -97,7 +99,8 @@ mod arena_tests {
let render = RenderConfig {
print_width,
indent: " ",
..RenderConfig::default()
#[cfg(feature = "comment_check")]
purpose: RenderPurpose::Output,
};
render_test(arena, doc, &render, 0)
}
Expand All @@ -107,7 +110,8 @@ mod arena_tests {
let render = RenderConfig {
print_width,
indent: "\t",
..RenderConfig::default()
#[cfg(feature = "comment_check")]
purpose: RenderPurpose::Output,
};
render_test(arena, doc, &render, 0)
}
Expand Down Expand Up @@ -648,7 +652,8 @@ mod arena_tests {
let render = RenderConfig {
print_width: 12,
indent: "\t",
..RenderConfig::default()
#[cfg(feature = "comment_check")]
purpose: RenderPurpose::Output,
};
assert_eq!(
render_test(&a, doc, &render, 0),
Expand Down Expand Up @@ -782,7 +787,8 @@ mod arena_tests {
let render = RenderConfig {
print_width: 100,
indent: "\t",
..RenderConfig::default()
#[cfg(feature = "comment_check")]
purpose: RenderPurpose::Output,
};
let embed = EmbedContext {
base_indent_offset: 1,
Expand Down