From 105fdb0cc7d3b414b43cf7e70aa556d25da85cd2 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Wed, 3 Aug 2022 11:40:47 +0900 Subject: [PATCH] =?UTF-8?q?[Rust]=20README=E8=BF=BD=E8=A8=98=E3=80=81?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E8=B5=B7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E8=A9=B1=E8=80=85ID=E3=82=92=E5=A4=A7=E3=81=8D=E3=81=8F=20(#21?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Rust] README追記、エラーが起きる話者IDを大きく * 修正漏れ --- README.md | 3 +++ crates/voicevox_core/src/internal.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ade9ce42..ea8b27ffc 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,9 @@ cargo build --release ## コアライブラリのテスト ```bash +# Windowsの場合は最初にonnxruntime.dllをカレントディレクトリにコピーする必要があります +# find target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib -name onnxruntime.dll -ctime 0 | head -n 1 | xargs -i cp {} target/debug/deps/ + cargo test ``` diff --git a/crates/voicevox_core/src/internal.rs b/crates/voicevox_core/src/internal.rs index 430dfc317..5a0b0ffb8 100644 --- a/crates/voicevox_core/src/internal.rs +++ b/crates/voicevox_core/src/internal.rs @@ -560,7 +560,7 @@ mod tests { #[rstest] #[case(0, Err(Error::UninitializedStatus), Ok(()))] #[case(1, Err(Error::UninitializedStatus), Ok(()))] - #[case(3, Err(Error::UninitializedStatus), Err(Error::InvalidSpeakerId{speaker_id:3}))] + #[case(999, Err(Error::UninitializedStatus), Err(Error::InvalidSpeakerId{speaker_id:999}))] fn load_model_works( #[case] speaker_id: usize, #[case] expected_result_at_uninitialized: Result<()>, @@ -585,7 +585,7 @@ mod tests { #[rstest] #[case(0, true)] #[case(1, true)] - #[case(3, false)] + #[case(999, false)] fn is_model_loaded_works(#[case] speaker_id: usize, #[case] expected: bool) { let internal = Internal::new_with_mutex(); assert!( @@ -632,7 +632,7 @@ mod tests { #[rstest] #[case(0, Some((0,0)))] #[case(1, Some((0,1)))] - #[case(3, None)] + #[case(999, None)] fn get_model_index_and_speaker_id_works( #[case] speaker_id: usize, #[case] expected: Option<(usize, usize)>,