mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
wip
This commit is contained in:
parent
68a3a7fceb
commit
ad61687e83
4 changed files with 7 additions and 8 deletions
|
@ -1,5 +1,4 @@
|
|||
use proc_macro2::TokenStream;
|
||||
use syn::parse::Nothing;
|
||||
|
||||
use crate::{
|
||||
hygiene::Hygiene,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{accumulator, storage::DatabaseGen, Database, Id};
|
||||
use crate::{accumulator, storage::DatabaseGen, Id};
|
||||
|
||||
use super::{Configuration, IngredientImpl};
|
||||
|
||||
|
|
|
@ -74,13 +74,13 @@ fn execute() {
|
|||
assert_eq!(final_result_depends_on_x(&db, input), 22);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"final_result_depends_on_x(MyInput { [salsa id]: 0 })",
|
||||
"final_result_depends_on_x(MyInput { [salsa id]: 0, field: 22 })",
|
||||
]"#]]);
|
||||
|
||||
assert_eq!(final_result_depends_on_y(&db, input), 22);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"final_result_depends_on_y(MyInput { [salsa id]: 0 })",
|
||||
"final_result_depends_on_y(MyInput { [salsa id]: 0, field: 22 })",
|
||||
]"#]]);
|
||||
|
||||
input.set_field(&mut db).to(23);
|
||||
|
@ -90,7 +90,7 @@ fn execute() {
|
|||
assert_eq!(final_result_depends_on_x(&db, input), 24);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"final_result_depends_on_x(MyInput { [salsa id]: 0 })",
|
||||
"final_result_depends_on_x(MyInput { [salsa id]: 0, field: 23 })",
|
||||
]"#]]);
|
||||
|
||||
// y = 23 / 2 = 11
|
||||
|
|
|
@ -59,13 +59,13 @@ fn execute() {
|
|||
assert_eq!(result_depends_on_x(&db, input), 23);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"result_depends_on_x(MyInput { [salsa id]: 0 })",
|
||||
"result_depends_on_x(MyInput { [salsa id]: 0, x: 22, y: 33 })",
|
||||
]"#]]);
|
||||
|
||||
assert_eq!(result_depends_on_y(&db, input), 32);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"result_depends_on_y(MyInput { [salsa id]: 0 })",
|
||||
"result_depends_on_y(MyInput { [salsa id]: 0, x: 22, y: 33 })",
|
||||
]"#]]);
|
||||
|
||||
input.set_x(&mut db).to(23);
|
||||
|
@ -73,7 +73,7 @@ fn execute() {
|
|||
assert_eq!(result_depends_on_x(&db, input), 24);
|
||||
db.assert_logs(expect![[r#"
|
||||
[
|
||||
"result_depends_on_x(MyInput { [salsa id]: 0 })",
|
||||
"result_depends_on_x(MyInput { [salsa id]: 0, x: 23, y: 33 })",
|
||||
]"#]]);
|
||||
|
||||
// input y is the same, so result depends on y
|
||||
|
|
Loading…
Reference in a new issue