diff --git a/src/protocol/tests/utils.rs b/src/protocol/tests/utils.rs index 0cd60489e610f5f90119e2519266e18d6e059495..9a4552e1bb1cec481978aad5ca51698f20b7094a 100644 --- a/src/protocol/tests/utils.rs +++ b/src/protocol/tests/utils.rs @@ -1,3 +1,4 @@ +use crate::collections::StringPool; use crate::protocol::{ ast::*, input_source::*, @@ -123,6 +124,7 @@ pub(crate) struct AstOkTester { heap: Heap, symbols: SymbolTable, types: TypeTable, + pool: StringPool, } impl AstOkTester { @@ -133,6 +135,7 @@ impl AstOkTester { heap: parser.heap, symbols: parser.symbol_table, types: parser.type_table, + pool: parser.string_pool, } } @@ -209,6 +212,7 @@ impl AstOkTester { let mut found = false; for definition in self.heap.definitions.iter() { if let Definition::Function(definition) = definition { + println!("DEBUG: Have {}", definition.identifier.value.as_str()); if definition.identifier.value.as_str() != name { continue; } @@ -218,6 +222,8 @@ impl AstOkTester { f(tester); found = true; break; + } else { + println!("DEBUG: Have (not a function, but) {}", definition.identifier().value.as_str()); } }