diff options
Diffstat (limited to 'tvix/eval/src/test_utils.rs')
-rw-r--r-- | tvix/eval/src/test_utils.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/test_utils.rs b/tvix/eval/src/test_utils.rs new file mode 100644 index 000000000000..a7d1c3f96899 --- /dev/null +++ b/tvix/eval/src/test_utils.rs @@ -0,0 +1,8 @@ +use codemap::CodeMap; + +/// Create a dummy [`codemap::Span`] for use in tests +pub(crate) fn dummy_span() -> codemap::Span { + let mut codemap = CodeMap::new(); + let file = codemap.add_file("<dummy>".to_owned(), "<dummy>".to_owned()); + file.span +} |