diff --git a/tests/tracked_fn_constant.rs b/tests/tracked_fn_constant.rs index b53f1b15..0f3c17af 100644 --- a/tests/tracked_fn_constant.rs +++ b/tests/tracked_fn_constant.rs @@ -2,13 +2,28 @@ //! compiles and executes successfully. #![allow(warnings)] +use crate::common::LogDatabase; + +mod common; + #[salsa::tracked] fn tracked_fn(db: &dyn salsa::Database) -> u32 { 44 } +#[salsa::tracked] +fn tracked_custom_db(db: &dyn LogDatabase) -> u32 { + 44 +} + #[test] fn execute() { let mut db = salsa::DatabaseImpl::new(); assert_eq!(tracked_fn(&db), 44); } + +#[test] +fn execute_custom() { + let mut db = common::LoggerDatabase::new(); + assert_eq!(tracked_custom_db(&db), 44); +} \ No newline at end of file