Consolidate uses of test-case to rstest (#14250)

With #14083 a dependency on `test-case` was introduced, we already
depend on the more exp(a/e)nsive `rstest` for our macro-based test case
generation (with fixtures on top)

To save on some compilation for proc macros unify to `rstest`
This commit is contained in:
Stefan Holderbach
2024-11-04 19:07:59 +01:00
committed by GitHub
parent 9f09930834
commit e172a621f3
4 changed files with 12 additions and 49 deletions

View File

@@ -4,8 +4,8 @@ use reedline::{
FileBackedHistory, History, HistoryItem, HistoryItemId, ReedlineError, SearchQuery,
SqliteBackedHistory,
};
use rstest::rstest;
use tempfile::TempDir;
use test_case::case;
struct Test {
cfg_dir: TempDir,
@@ -251,9 +251,10 @@ fn to_empty_sqlite() {
.run()
}
#[case(HistoryFileFormat::Plaintext; "plaintext")]
#[case(HistoryFileFormat::Sqlite; "sqlite")]
fn to_existing(dst_format: HistoryFileFormat) {
#[rstest]
#[case::plaintext(HistoryFileFormat::Plaintext)]
#[case::sqlite(HistoryFileFormat::Sqlite)]
fn to_existing(#[case] dst_format: HistoryFileFormat) {
TestCase {
dst_format,
dst_history: vec![