From 5c9e7b13ed03cd2029f909af8633fe2273e78163 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 19 Sep 2023 21:47:52 -0700 Subject: [PATCH 1/2] tests: leverage `TestRepo::init()` in `test_merged_tree` I forgot to update these call sites when I introduced (the new version of) `TestRepo::init()`. --- lib/tests/test_merged_tree.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/tests/test_merged_tree.rs b/lib/tests/test_merged_tree.rs index a8941ca4a0..4f291fba39 100644 --- a/lib/tests/test_merged_tree.rs +++ b/lib/tests/test_merged_tree.rs @@ -21,7 +21,7 @@ use jj_lib::repo::Repo; use jj_lib::repo_path::{RepoPath, RepoPathComponent, RepoPathJoin}; use jj_lib::tree::merge_trees; use pretty_assertions::assert_eq; -use testutils::{create_single_tree, write_file, TestRepo, TestRepoBackend}; +use testutils::{create_single_tree, write_file, TestRepo}; fn file_value(file_id: &FileId) -> TreeValue { TreeValue::File { @@ -32,7 +32,7 @@ fn file_value(file_id: &FileId) -> TreeValue { #[test] fn test_from_legacy_tree() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let store = repo.store(); @@ -223,7 +223,7 @@ fn test_from_legacy_tree() { #[test] fn test_path_value_and_entries() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // Create a MergedTree @@ -348,7 +348,7 @@ fn test_path_value_and_entries() { #[test] fn test_resolve_success() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let unchanged_path = RepoPath::from_internal_string("unchanged"); @@ -415,7 +415,7 @@ fn test_resolve_success() { #[test] fn test_resolve_root_becomes_empty() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let store = repo.store(); @@ -432,7 +432,7 @@ fn test_resolve_root_becomes_empty() { #[test] fn test_resolve_with_conflict() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // The trivial conflict should be resolved but the non-trivial should not (and @@ -459,7 +459,7 @@ fn test_resolve_with_conflict() { #[test] fn test_conflict_iterator() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let unchanged_path = RepoPath::from_internal_string("dir/subdir/unchanged"); @@ -575,7 +575,7 @@ fn test_conflict_iterator() { } #[test] fn test_conflict_iterator_higher_arity() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let two_sided_path = RepoPath::from_internal_string("dir/2-sided"); @@ -652,7 +652,7 @@ fn test_conflict_iterator_higher_arity() { /// Diff two resolved trees #[test] fn test_diff_resolved() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let clean_path = RepoPath::from_internal_string("dir1/file"); @@ -711,7 +711,7 @@ fn test_diff_resolved() { /// Diff two conflicted trees #[test] fn test_diff_conflicted() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // path1 is a clean (unchanged) conflict @@ -816,7 +816,7 @@ fn test_diff_conflicted() { #[test] fn test_diff_dir_file() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // path1: file1 -> directory1 @@ -1048,7 +1048,7 @@ fn test_diff_dir_file() { /// Merge 3 resolved trees that can be resolved #[test] fn test_merge_simple() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let path1 = RepoPath::from_internal_string("dir1/file"); @@ -1069,7 +1069,7 @@ fn test_merge_simple() { /// Merge 3 resolved trees that can be partially resolved #[test] fn test_merge_partial_resolution() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // path1 can be resolved, path2 cannot @@ -1096,7 +1096,7 @@ fn test_merge_partial_resolution() { /// Merge 3 resolved trees, including one empty legacy tree #[test] fn test_merge_with_empty_legacy_tree() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let path1 = RepoPath::from_internal_string("dir1/file"); @@ -1121,7 +1121,7 @@ fn test_merge_with_empty_legacy_tree() { /// at by only simplifying the conflict (no need to recurse) #[test] fn test_merge_simplify_only() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let path = RepoPath::from_internal_string("dir1/file"); @@ -1154,7 +1154,7 @@ fn test_merge_simplify_only() { /// result is a 3-way conflict. #[test] fn test_merge_simplify_result() { - let test_repo = TestRepo::init_with_backend(TestRepoBackend::Test); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // The conflict in path1 cannot be resolved, but the conflict in path2 can. From 859c4f7f30d173cc4c21ffef1f0b27b39a6ae140 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Tue, 19 Sep 2023 05:36:45 -0700 Subject: [PATCH 2/2] tests: test views, operations, and mutable repos only with test backend I don't think the backend type should matter for any of these. --- lib/tests/test_mut_repo.rs | 135 +++++++++++++++-------------------- lib/tests/test_operations.rs | 31 ++++---- lib/tests/test_view.rs | 22 +++--- 3 files changed, 79 insertions(+), 109 deletions(-) diff --git a/lib/tests/test_mut_repo.rs b/lib/tests/test_mut_repo.rs index cd22455eed..069ba672de 100644 --- a/lib/tests/test_mut_repo.rs +++ b/lib/tests/test_mut_repo.rs @@ -15,18 +15,15 @@ use jj_lib::op_store::{RefTarget, WorkspaceId}; use jj_lib::repo::Repo; use maplit::hashset; -use test_case::test_case; use testutils::{ assert_rebased, create_random_commit, write_random_commit, CommitGraphBuilder, TestRepo, - TestRepoBackend, }; -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_edit(backend: TestRepoBackend) { +#[test] +fn test_edit() { // Test that MutableRepo::edit() uses the requested commit (not a new child) let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -40,12 +37,11 @@ fn test_edit(backend: TestRepoBackend) { assert_eq!(repo.view().get_wc_commit_id(&ws_id), Some(wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout(backend: TestRepoBackend) { +#[test] +fn test_checkout() { // Test that MutableRepo::check_out() creates a child let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -65,13 +61,12 @@ fn test_checkout(backend: TestRepoBackend) { assert_eq!(repo.view().get_wc_commit_id(&ws_id), Some(wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout_previous_not_empty(backend: TestRepoBackend) { +#[test] +fn test_checkout_previous_not_empty() { // Test that MutableRepo::check_out() does not usually abandon the previous // commit. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -89,13 +84,12 @@ fn test_checkout_previous_not_empty(backend: TestRepoBackend) { assert!(mut_repo.view().heads().contains(old_wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout_previous_empty(backend: TestRepoBackend) { +#[test] +fn test_checkout_previous_empty() { // Test that MutableRepo::check_out() abandons the previous commit if it was // empty. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -120,13 +114,12 @@ fn test_checkout_previous_empty(backend: TestRepoBackend) { assert!(!mut_repo.view().heads().contains(old_wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout_previous_empty_with_description(backend: TestRepoBackend) { +#[test] +fn test_checkout_previous_empty_with_description() { // Test that MutableRepo::check_out() does not abandon the previous commit if it // has a non-empty description. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -152,13 +145,12 @@ fn test_checkout_previous_empty_with_description(backend: TestRepoBackend) { assert!(mut_repo.view().heads().contains(old_wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout_previous_empty_with_local_branch(backend: TestRepoBackend) { +#[test] +fn test_checkout_previous_empty_with_local_branch() { // Test that MutableRepo::check_out() does not abandon the previous commit if it // is pointed by local branch. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -184,13 +176,12 @@ fn test_checkout_previous_empty_with_local_branch(backend: TestRepoBackend) { assert!(mut_repo.view().heads().contains(old_wc_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_checkout_previous_empty_non_head(backend: TestRepoBackend) { +#[test] +fn test_checkout_previous_empty_non_head() { // Test that MutableRepo::check_out() does not abandon the previous commit if it // was empty and is not a head let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -226,13 +217,12 @@ fn test_checkout_previous_empty_non_head(backend: TestRepoBackend) { ); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_edit_initial(backend: TestRepoBackend) { +#[test] +fn test_edit_initial() { // Test that MutableRepo::edit() can be used on the initial working-copy commit // in a workspace let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -251,13 +241,12 @@ fn test_edit_initial(backend: TestRepoBackend) { ); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_add_head_success(backend: TestRepoBackend) { +#[test] +fn test_add_head_success() { // Test that MutableRepo::add_head() adds the head, and that it's still there // after commit. It should also be indexed. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; // Create a commit outside of the repo by using a temporary transaction. Then @@ -278,13 +267,12 @@ fn test_add_head_success(backend: TestRepoBackend) { assert!(repo.index().has_id(new_commit.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_add_head_ancestor(backend: TestRepoBackend) { +#[test] +fn test_add_head_ancestor() { // Test that MutableRepo::add_head() does not add a head if it's an ancestor of // an existing head. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -301,13 +289,12 @@ fn test_add_head_ancestor(backend: TestRepoBackend) { assert_eq!(repo.view().heads(), &hashset! {commit3.id().clone()}); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_add_head_not_immediate_child(backend: TestRepoBackend) { +#[test] +fn test_add_head_not_immediate_child() { // Test that MutableRepo::add_head() can be used for adding a head that is not // an immediate child of a current head. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -341,14 +328,13 @@ fn test_add_head_not_immediate_child(backend: TestRepoBackend) { assert!(mut_repo.index().has_id(child.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_remove_head(backend: TestRepoBackend) { +#[test] +fn test_remove_head() { // Test that MutableRepo::remove_head() removes the head, and that it's still // removed after commit. It should remain in the index, since we otherwise would // have to reindex everything. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -379,13 +365,12 @@ fn test_remove_head(backend: TestRepoBackend) { assert!(repo.index().has_id(commit3.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_add_public_head(backend: TestRepoBackend) { +#[test] +fn test_add_public_head() { // Test that MutableRepo::add_public_head() adds the head, and that it's still // there after commit. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -401,13 +386,12 @@ fn test_add_public_head(backend: TestRepoBackend) { assert!(repo.view().public_heads().contains(commit1.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_add_public_head_ancestor(backend: TestRepoBackend) { +#[test] +fn test_add_public_head_ancestor() { // Test that MutableRepo::add_public_head() does not add a public head if it's // an ancestor of an existing public head. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -426,13 +410,12 @@ fn test_add_public_head_ancestor(backend: TestRepoBackend) { assert!(!repo.view().public_heads().contains(commit1.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_remove_public_head(backend: TestRepoBackend) { +#[test] +fn test_remove_public_head() { // Test that MutableRepo::remove_public_head() removes the head, and that it's // still removed after commit. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -450,14 +433,13 @@ fn test_remove_public_head(backend: TestRepoBackend) { assert!(!repo.view().public_heads().contains(commit1.id())); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_has_changed(backend: TestRepoBackend) { +#[test] +fn test_has_changed() { // Test that MutableRepo::has_changed() reports changes iff the view has changed // (e.g. not after setting a branch to point to where it was already // pointing). let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -528,14 +510,13 @@ fn test_has_changed(backend: TestRepoBackend) { assert!(!mut_repo.has_changes()); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_rebase_descendants_simple(backend: TestRepoBackend) { +#[test] +fn test_rebase_descendants_simple() { // Tests that MutableRepo::create_descendant_rebaser() creates a // DescendantRebaser that rebases descendants of rewritten and abandoned // commits. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -567,13 +548,12 @@ fn test_rebase_descendants_simple(backend: TestRepoBackend) { .is_none()); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_rebase_descendants_conflicting_rewrite(backend: TestRepoBackend) { +#[test] +fn test_rebase_descendants_conflicting_rewrite() { // Tests MutableRepo::create_descendant_rebaser() when a commit has been marked // as rewritten to several other commits. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -602,11 +582,10 @@ fn test_rebase_descendants_conflicting_rewrite(backend: TestRepoBackend) { .is_none()); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_rename_remote(backend: TestRepoBackend) { +#[test] +fn test_rename_remote() { let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); let mut_repo = tx.mut_repo(); diff --git a/lib/tests/test_operations.rs b/lib/tests/test_operations.rs index 79a2623f5b..74c570708e 100644 --- a/lib/tests/test_operations.rs +++ b/lib/tests/test_operations.rs @@ -16,8 +16,7 @@ use std::path::Path; use jj_lib::backend::{CommitId, ObjectId}; use jj_lib::repo::Repo; -use test_case::test_case; -use testutils::{create_random_commit, write_random_commit, TestRepo, TestRepoBackend}; +use testutils::{create_random_commit, write_random_commit, TestRepo}; fn list_dir(dir: &Path) -> Vec { std::fs::read_dir(dir) @@ -26,12 +25,11 @@ fn list_dir(dir: &Path) -> Vec { .collect() } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_unpublished_operation(backend: TestRepoBackend) { +#[test] +fn test_unpublished_operation() { // Test that the operation doesn't get published until that's requested. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let op_heads_dir = repo.repo_path().join("op_heads").join("heads"); @@ -48,13 +46,12 @@ fn test_unpublished_operation(backend: TestRepoBackend) { assert_eq!(list_dir(&op_heads_dir), vec![op_id1.hex()]); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_consecutive_operations(backend: TestRepoBackend) { +#[test] +fn test_consecutive_operations() { // Test that consecutive operations result in a single op-head on disk after // each operation let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let op_heads_dir = repo.repo_path().join("op_heads").join("heads"); @@ -81,13 +78,12 @@ fn test_consecutive_operations(backend: TestRepoBackend) { assert_eq!(list_dir(&op_heads_dir), vec![op_id2.hex()]); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_concurrent_operations(backend: TestRepoBackend) { +#[test] +fn test_concurrent_operations() { // Test that consecutive operations result in multiple op-heads on disk until // the repo has been reloaded (which currently happens right away). let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let op_heads_dir = repo.repo_path().join("op_heads").join("heads"); @@ -127,12 +123,11 @@ fn assert_heads(repo: &dyn Repo, expected: Vec<&CommitId>) { assert_eq!(*repo.view().heads(), expected); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_isolation(backend: TestRepoBackend) { +#[test] +fn test_isolation() { // Test that two concurrent transactions don't see each other's changes. let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); diff --git a/lib/tests/test_view.rs b/lib/tests/test_view.rs index 0d4e47d2ca..0915db15c8 100644 --- a/lib/tests/test_view.rs +++ b/lib/tests/test_view.rs @@ -18,13 +18,11 @@ use maplit::{btreemap, hashset}; use test_case::test_case; use testutils::{ commit_transactions, create_random_commit, write_random_commit, CommitGraphBuilder, TestRepo, - TestRepoBackend, }; -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_heads_empty(backend: TestRepoBackend) { - let test_repo = TestRepo::init_with_backend(backend); +#[test] +fn test_heads_empty() { + let test_repo = TestRepo::init(); let repo = &test_repo.repo; assert_eq!( @@ -37,11 +35,10 @@ fn test_heads_empty(backend: TestRepoBackend) { ); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_heads_fork(backend: TestRepoBackend) { +#[test] +fn test_heads_fork() { let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test"); @@ -60,11 +57,10 @@ fn test_heads_fork(backend: TestRepoBackend) { ); } -#[test_case(TestRepoBackend::Local ; "local backend")] -#[test_case(TestRepoBackend::Git ; "git backend")] -fn test_heads_merge(backend: TestRepoBackend) { +#[test] +fn test_heads_merge() { let settings = testutils::user_settings(); - let test_repo = TestRepo::init_with_backend(backend); + let test_repo = TestRepo::init(); let repo = &test_repo.repo; let mut tx = repo.start_transaction(&settings, "test");