From aacb8039ee3f9c51d371c3799274dd4b01c18beb Mon Sep 17 00:00:00 2001 From: Jesse Hallett Date: Thu, 21 Nov 2024 18:11:45 -0800 Subject: [PATCH] add todo test --- .../src/native_query/type_solver/simplify.rs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/crates/cli/src/native_query/type_solver/simplify.rs b/crates/cli/src/native_query/type_solver/simplify.rs index 0e682350..be8cc41d 100644 --- a/crates/cli/src/native_query/type_solver/simplify.rs +++ b/crates/cli/src/native_query/type_solver/simplify.rs @@ -697,4 +697,43 @@ mod tests { ); Ok(()) } + + // TODO: + // #[googletest::test] + // fn simplifies_two_compatible_unions_in_contravariant_context() -> Result<()> { + // let configuration = mflix_config(); + // let result = super::simplify_constraints( + // &configuration, + // &Default::default(), + // &mut Default::default(), + // Some(TypeVariable::new(1, Variance::Contravariant)), + // [ + // TypeConstraint::Union( + // [ + // TypeConstraint::Scalar(BsonScalarType::Double), + // TypeConstraint::Scalar(BsonScalarType::Null), + // ] + // .into(), + // ), + // TypeConstraint::Union( + // [ + // TypeConstraint::Scalar(BsonScalarType::Int), + // TypeConstraint::Scalar(BsonScalarType::Null), + // ] + // .into(), + // ), + // ], + // ); + // expect_that!( + // result, + // ok(eq(&BTreeSet::from([TypeConstraint::Union( + // [ + // TypeConstraint::Scalar(BsonScalarType::Int), + // TypeConstraint::Scalar(BsonScalarType::Null), + // ] + // .into(), + // )]))) + // ); + // Ok(()) + // } }