File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 423
423
- [ 引数のパース] ( std_misc/arg/matching.md )
424
424
- [ 他言語関数インターフェイス] ( std_misc/ffi.md )
425
425
426
- - [ Testing] ( testing.md )
426
+ <!-- - [Testing](testing.md)
427
427
- [Unit testing](testing/unit_testing.md)
428
428
- [Documentation testing](testing/doc_testing.md)
429
429
- [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
+
431
438
432
439
<!--
433
440
- [Unsafe Operations](unsafe.md)
Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ One such example is [`pretty_assertions`](https://docs.rs/pretty_assertions/1.0.
16
16
File `Cargo.toml`:
17
17
-->
18
18
そのようなクレートの例として、[ ` pretty_assertions ` ] ( https://docs.rs/pretty_assertions/1.0.0/pretty_assertions/index.html ) クレートが挙げられます。これは、標準の` assert_eq! ` と` assert_ne! ` マクロを拡張して、差分をカラフルに表示するものです。
19
+
19
20
ファイル` Cargo.toml ` :
20
21
21
22
``` toml
22
23
# standard crate data is left out
24
+ # 本節の内容に関係のない行は省略しています。
23
25
[dev-dependencies ]
24
26
pretty_assertions = " 1"
25
27
```
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ pub fn div(a: i32, b: i32) -> i32 {
67
67
68
68
Code blocks in documentation are automatically tested
69
69
when running the regular ` cargo test ` command:
70
+ ドキュメンテーションコメント中のコードブロックは、` cargo test ` コマンドで自動的にテストされます。
70
71
71
72
``` shell
72
73
$ cargo test
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Each Rust source file in the `tests` directory is compiled as a separate crate.
77
77
order to share some code between integration tests we can make a module with public
78
78
functions, importing and using it within tests.
79
79
-->
80
- ` tests ` ディレクトリにあるRustのソースファイルは別のクレートしてコンパイルされます 。インテグレーションテストの間でコードを共有するには、パブリックな関数をモジュールに入れて、それぞれのテストでインポートして利用する方法があります。
80
+ ` tests ` ディレクトリにあるRustのソースファイルは別のクレートとしてコンパイルされます 。インテグレーションテストの間でコードを共有するには、パブリックな関数をモジュールに入れて、それぞれのテストでインポートして利用する方法があります。
81
81
82
82
<!--
83
83
File `tests/common/mod.rs`:
@@ -115,9 +115,10 @@ fn test_add() {
115
115
}
116
116
```
117
117
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
119
119
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 ` 中のテストも自動的に実行されてしまうため非推奨です。
121
122
122
123
[ unit ] : unit_testing.md
123
124
[ mod ] : ../mod.md
You can’t perform that action at this time.
0 commit comments