From c7faba0c8ee0eea6b20540569ecbd99eb76fedfa Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 18 Sep 2022 13:22:02 -0400 Subject: test(tvix/eval): Add tests for the Eq laws of Value Only running 20 cases for now, since Value can get quite big if you let it run for a while. Change-Id: I09ef19da22c789c4869793836c98937c44595340 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6648 Autosubmit: grfn Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/value/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tvix/eval/src/value') diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs index 85abbcd3eece..594c1fd4735c 100644 --- a/tvix/eval/src/value/mod.rs +++ b/tvix/eval/src/value/mod.rs @@ -332,3 +332,19 @@ fn type_error(expected: &'static str, actual: &Value) -> ErrorKind { actual: actual.type_of(), } } + +#[cfg(test)] +mod tests { + use crate::properties::eq_laws; + use proptest::prelude::ProptestConfig; + + use super::*; + + eq_laws!( + Value, + ProptestConfig { + cases: 20, + ..Default::default() + } + ); +} -- cgit 1.4.1