Skip to content

Commit

Permalink
[Rust] README追記、エラーが起きる話者IDを大きく (#211)
Browse files Browse the repository at this point in the history
* [Rust] README追記、エラーが起きる話者IDを大きく

* 修正漏れ
  • Loading branch information
Hiroshiba authored Aug 3, 2022
1 parent 6dfaa72 commit 105fdb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 105fdb0

Please sign in to comment.