Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust] README追記、エラーが起きる話者IDを大きく #211

Merged
merged 2 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
6 changes: 3 additions & 3 deletions crates/voicevox_core/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()>,
Expand All @@ -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!(
Expand Down Expand Up @@ -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)>,
Expand Down