mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 21:05:11 +00:00
Add failing test
This commit is contained in:
parent
d5018d5614
commit
4609fd0043
1 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue