about summary refs log tree commit diff
path: root/tvix/eval/src/test_utils.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2022-09-18T16·38-0400
committerclbot <clbot@tvl.fyi>2022-09-18T17·55+0000
commit221d3b9485a1d84fc4d9f06d864242d3c393d0ba (patch)
treee3d909f886e9f57b995f46ca7cc445700d57d39c /tvix/eval/src/test_utils.rs
parentbb47baf638c96d133dae51827ff676166d818153 (diff)
test(tvix/eval): Add proof-of-concept test for Chunk r/4901
This is pretty boring at the moment, but mostly serves as a foot in the
door in the direction of writing more tests

Change-Id: Id88eb4ec7e53ebb2d5b5c254c8f45ff750238811
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6637
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/test_utils.rs')
-rw-r--r--tvix/eval/src/test_utils.rs8
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
+}