Skip to content

Commit

Permalink
proptest for q460: decrease cases to 10 with each 200 operations
Browse files Browse the repository at this point in the history
  • Loading branch information
drink7036290 committed Nov 30, 2024
1 parent 23e9ba7 commit 392b89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions implementations/q460_lfu_cache/tests/proptest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn cache_operation_strategy() -> impl Strategy<Value = CacheOperation> {

// Generator for operation sequences with length up to 2e5
fn operation_sequence_strategy() -> impl Strategy<Value = Vec<CacheOperation>> {
prop::collection::vec(cache_operation_strategy(), 1..=200_000)
prop::collection::vec(cache_operation_strategy(), 1..=200)
}

fn test_lfu_cache_with_operations(capacity: i32, operations: Vec<CacheOperation>) {
Expand Down Expand Up @@ -64,7 +64,7 @@ fn test_lfu_cache_with_operations(capacity: i32, operations: Vec<CacheOperation>

#[test]
fn test_lfu_cache_implementations() {
let config = ProptestConfig::with_cases(2); // Number of test cases to generate
let config = ProptestConfig::with_cases(10); // Number of test cases to generate
proptest!(config, |(capacity in 1..=10_000i32, operations in operation_sequence_strategy())| {
test_lfu_cache_with_operations(capacity, operations);
});
Expand Down

0 comments on commit 392b89c

Please sign in to comment.