mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Consolidate variable pretty printing
This commit is contained in:
parent
3de35f7aa2
commit
a9507cf917
7 changed files with 28 additions and 43 deletions
|
@ -29,7 +29,7 @@ mod test_load {
|
|||
use roc_reporting::report::RenderTarget;
|
||||
use roc_reporting::report::RocDocAllocator;
|
||||
use roc_target::TargetInfo;
|
||||
use roc_types::pretty_print::{content_to_string, name_all_type_vars};
|
||||
use roc_types::pretty_print::name_and_print_var;
|
||||
use roc_types::subs::Subs;
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -237,10 +237,7 @@ mod test_load {
|
|||
expected_types: &mut HashMap<&str, &str>,
|
||||
) {
|
||||
for (symbol, expr_var) in &def.pattern_vars {
|
||||
let named_result = name_all_type_vars(*expr_var, subs);
|
||||
|
||||
let content = subs.get_content_without_compacting(*expr_var);
|
||||
let actual_str = content_to_string(content, subs, home, interns, named_result);
|
||||
let actual_str = name_and_print_var(*expr_var, subs, home, interns);
|
||||
let fully_qualified = symbol.fully_qualified(interns, home).to_string();
|
||||
let expected_type = expected_types
|
||||
.remove(fully_qualified.as_str())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue