Skip to content

Commit

Permalink
chore: refactor to use test_strategy in Canonical State proptests (#4200
Browse files Browse the repository at this point in the history
)

Same story has [this](#4163).
  • Loading branch information
stiegerc authored Mar 3, 2025
1 parent 751e615 commit cb8c147
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 182 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions rs/canonical_state/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ DEV_DEPENDENCIES = [
"@crate_index//:tempfile",
]

DEV_MACRO_DEPENDENCIES = [
MACRO_DEV_DEPENDENCIES = [
# Keep sorted.
"@crate_index//:test-strategy",
]

rust_library(
Expand All @@ -68,20 +70,20 @@ rust_test(
rust_test(
name = "compatibility_test",
srcs = ["tests/compatibility.rs"],
proc_macro_deps = DEV_MACRO_DEPENDENCIES,
proc_macro_deps = MACRO_DEV_DEPENDENCIES,
deps = DEPENDENCIES + DEV_DEPENDENCIES + [":canonical_state"],
)

rust_test(
name = "size_limit_visitor_test",
srcs = ["tests/size_limit_visitor.rs"],
proc_macro_deps = DEV_MACRO_DEPENDENCIES,
proc_macro_deps = MACRO_DEV_DEPENDENCIES,
deps = DEPENDENCIES + DEV_DEPENDENCIES + [":canonical_state"],
)

rust_test(
name = "hash_tree_test",
srcs = ["tests/hash_tree.rs"],
proc_macro_deps = DEV_MACRO_DEPENDENCIES,
proc_macro_deps = MACRO_DEV_DEPENDENCIES,
deps = DEPENDENCIES + DEV_DEPENDENCIES + [":canonical_state"],
)
1 change: 1 addition & 0 deletions rs/canonical_state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ ic-wasm-types = { path = "../types/wasm_types" }
lazy_static = { workspace = true }
maplit = "1.0.2"
proptest = { workspace = true }
test-strategy = "0.4.0"
tempfile = { workspace = true }
Loading

0 comments on commit cb8c147

Please sign in to comment.