Skip to content

Commit 6010396

Browse files
committed
Refine Chapter 21 translation.
1 parent 041a9a9 commit 6010396

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

src/SUMMARY.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,18 @@
423423
- [引数のパース](std_misc/arg/matching.md)
424424
- [他言語関数インターフェイス](std_misc/ffi.md)
425425

426-
- [Testing](testing.md)
426+
<!-- - [Testing](testing.md)
427427
- [Unit testing](testing/unit_testing.md)
428428
- [Documentation testing](testing/doc_testing.md)
429429
- [Integration testing](testing/integration_testing.md)
430-
- [Dev-dependencies](testing/dev_dependencies.md)
430+
- [Dev-dependencies](testing/dev_dependencies.md) -->
431+
432+
- [テスト](testing.md)
433+
- [ユニットテスト](testing/unit_testing.md)
434+
- [ドキュメンテーションテスト](testing/doc_testing.md)
435+
- [インテグレーションテスト](testing/integration_testing.md)
436+
- [開発中の依存関係](testing/dev_dependencies.md)
437+
431438

432439
<!--
433440
- [Unsafe Operations](unsafe.md)

src/testing/dev_dependencies.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ One such example is [`pretty_assertions`](https://docs.rs/pretty_assertions/1.0.
1616
File `Cargo.toml`:
1717
-->
1818
そのようなクレートの例として、[`pretty_assertions`](https://docs.rs/pretty_assertions/1.0.0/pretty_assertions/index.html)クレートが挙げられます。これは、標準の`assert_eq!``assert_ne!`マクロを拡張して、差分をカラフルに表示するものです。
19+
1920
ファイル`Cargo.toml`:
2021

2122
```toml
2223
# standard crate data is left out
24+
# 本節の内容に関係のない行は省略しています。
2325
[dev-dependencies]
2426
pretty_assertions = "1"
2527
```

src/testing/doc_testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pub fn div(a: i32, b: i32) -> i32 {
6767

6868
Code blocks in documentation are automatically tested
6969
when running the regular `cargo test` command:
70+
ドキュメンテーションコメント中のコードブロックは、`cargo test`コマンドで自動的にテストされます。
7071

7172
```shell
7273
$ cargo test

src/testing/integration_testing.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Each Rust source file in the `tests` directory is compiled as a separate crate.
7777
order to share some code between integration tests we can make a module with public
7878
functions, importing and using it within tests.
7979
-->
80-
`tests`ディレクトリにあるRustのソースファイルは別のクレートしてコンパイルされます。インテグレーションテストの間でコードを共有するには、パブリックな関数をモジュールに入れて、それぞれのテストでインポートして利用する方法があります。
80+
`tests`ディレクトリにあるRustのソースファイルは別のクレートとしてコンパイルされます。インテグレーションテストの間でコードを共有するには、パブリックな関数をモジュールに入れて、それぞれのテストでインポートして利用する方法があります。
8181

8282
<!--
8383
File `tests/common/mod.rs`:
@@ -115,9 +115,10 @@ fn test_add() {
115115
}
116116
```
117117

118-
Creating the module as `tests/common.rs` also works, but is not recommended
118+
<!-- Creating the module as `tests/common.rs` also works, but is not recommended
119119
because the test runner will treat the file as a test crate and try to run tests
120-
inside it.
120+
inside it. -->
121+
モジュールを`tests/common.rs`に記述することも可能ですが、`tests/common.rs`中のテストも自動的に実行されてしまうため非推奨です。
121122

122123
[unit]: unit_testing.md
123124
[mod]: ../mod.md

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy