From 82a1e59e460107d00c43ca1345929f71c232f1f2 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 19 Jul 2024 06:24:51 -0400 Subject: [PATCH] update expect tests --- tests/accumulate-from-tracked-fn.rs | 16 ++++++++++++---- tests/accumulate-reuse-workaround.rs | 10 +++++----- tests/accumulate-reuse.rs | 8 ++++---- tests/accumulate.rs | 2 +- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/tests/accumulate-from-tracked-fn.rs b/tests/accumulate-from-tracked-fn.rs index f79800fc..0900dd69 100644 --- a/tests/accumulate-from-tracked-fn.rs +++ b/tests/accumulate-from-tracked-fn.rs @@ -74,8 +74,12 @@ fn test1() { compute(&db, l1); expect![[r#" [ - 11, - 1, + Integers( + 11, + ), + Integers( + 1, + ), ] "#]] .assert_debug_eq(&compute::accumulated::(&db, l1)); @@ -84,8 +88,12 @@ fn test1() { compute(&db, l1); expect![[r#" [ - 12, - 2, + Integers( + 12, + ), + Integers( + 2, + ), ] "#]] .assert_debug_eq(&compute::accumulated::(&db, l1)); diff --git a/tests/accumulate-reuse-workaround.rs b/tests/accumulate-reuse-workaround.rs index bb496f99..7fa47ae0 100644 --- a/tests/accumulate-reuse-workaround.rs +++ b/tests/accumulate-reuse-workaround.rs @@ -81,9 +81,9 @@ fn test1() { assert_eq!(compute(&db, l2), 2); db.assert_logs(expect![[r#" [ - "compute(List { [salsa id]: 1 })", - "accumulated(List { [salsa id]: 0 })", - "compute(List { [salsa id]: 0 })", + "compute(List { [salsa id]: 1, value: 2, next: Some(List { [salsa id]: 0, value: 1, next: None }) })", + "accumulated(List { [salsa id]: 0, value: 1, next: None })", + "compute(List { [salsa id]: 0, value: 1, next: None })", ]"#]]); // When we mutate `l1`, we should re-execute `compute` for `l1`, @@ -93,7 +93,7 @@ fn test1() { assert_eq!(compute(&db, l2), 2); db.assert_logs(expect![[r#" [ - "accumulated(List { [salsa id]: 0 })", - "compute(List { [salsa id]: 0 })", + "accumulated(List { [salsa id]: 0, value: 2, next: None })", + "compute(List { [salsa id]: 0, value: 2, next: None })", ]"#]]); } diff --git a/tests/accumulate-reuse.rs b/tests/accumulate-reuse.rs index 492f342a..c70893e4 100644 --- a/tests/accumulate-reuse.rs +++ b/tests/accumulate-reuse.rs @@ -73,8 +73,8 @@ fn test1() { assert_eq!(compute(&db, l2), 2); db.assert_logs(expect![[r#" [ - "compute(List { [salsa id]: 1 })", - "compute(List { [salsa id]: 0 })", + "compute(List { [salsa id]: 1, value: 2, next: Some(List { [salsa id]: 0, value: 1, next: None }) })", + "compute(List { [salsa id]: 0, value: 1, next: None })", ]"#]]); // When we mutate `l1`, we should re-execute `compute` for `l1`, @@ -85,7 +85,7 @@ fn test1() { assert_eq!(compute(&db, l2), 2); db.assert_logs(expect![[r#" [ - "compute(List { [salsa id]: 1 })", - "compute(List { [salsa id]: 0 })", + "compute(List { [salsa id]: 1, value: 2, next: Some(List { [salsa id]: 0, value: 2, next: None }) })", + "compute(List { [salsa id]: 0, value: 2, next: None })", ]"#]]); } diff --git a/tests/accumulate.rs b/tests/accumulate.rs index 6fb4e05f..1ffde862 100644 --- a/tests/accumulate.rs +++ b/tests/accumulate.rs @@ -169,7 +169,7 @@ fn change_a_from_2_to_0() { .assert_eq(&format!("{:#?}", logs)); db.assert_logs(expect![[r#" [ - "push_logs(a = 1, b = 3)", + "push_logs(a = 0, b = 3)", ]"#]]); }