mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 06:20:32 +02:00
zh-TW: translate testing (#972)
* zh-TW: translate testing Part of #684. * zh-TW: Apply suggestion on proptest description --------- Co-authored-by: Jonathan Hao <phao@google.com>
This commit is contained in:
parent
86208e4435
commit
c83d164233
34
po/zh-TW.po
34
po/zh-TW.po
@ -9725,13 +9725,15 @@ msgstr "用 `cargo test` 尋找並執行單元測試。"
|
||||
|
||||
#: src/testing/test-modules.md:1
|
||||
msgid "# Test Modules"
|
||||
msgstr ""
|
||||
msgstr "# 測試模組"
|
||||
|
||||
#: src/testing/test-modules.md:3
|
||||
msgid ""
|
||||
"Unit tests are often put in a nested module (run tests on the\n"
|
||||
"[Playground](https://play.rust-lang.org/)):"
|
||||
msgstr ""
|
||||
"單元測試通常會位於巢狀模組中 (在\n"
|
||||
"[Playground](https://play.rust-lang.org/) 上執行測試):"
|
||||
|
||||
#: src/testing/test-modules.md:6
|
||||
msgid ""
|
||||
@ -9761,14 +9763,16 @@ msgid ""
|
||||
"* This lets you unit test private helpers.\n"
|
||||
"* The `#[cfg(test)]` attribute is only active when you run `cargo test`."
|
||||
msgstr ""
|
||||
"* 這有助於您對私人輔助程式進行單元測試。\n"
|
||||
"* 只有在執行 `cargo test` 時,`#[cfg(test)]` 屬性才會生效。"
|
||||
|
||||
#: src/testing/doc-tests.md:1
|
||||
msgid "# Documentation Tests"
|
||||
msgstr ""
|
||||
msgstr "# 說明文件測試"
|
||||
|
||||
#: src/testing/doc-tests.md:3
|
||||
msgid "Rust has built-in support for documentation tests:"
|
||||
msgstr ""
|
||||
msgstr "Rust 內建說明文件測試相關支援:"
|
||||
|
||||
#: src/testing/doc-tests.md:5
|
||||
msgid ""
|
||||
@ -9793,18 +9797,23 @@ msgid ""
|
||||
"* Test the above code on the [Rust Playground](https://play.rust-lang.org/?"
|
||||
"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0)."
|
||||
msgstr ""
|
||||
"* 系統會自動將 `///` 註解中的程式碼區塊視為 Rust 程式碼。\n"
|
||||
"* 系統會編譯程式碼,執行 `cargo test` 時會一併執行這些程式碼。\n"
|
||||
"* 請在 [Rust Playground](https://play.rust-lang.org/?"
|
||||
"version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0) "
|
||||
"上測試上述程式碼。"
|
||||
|
||||
#: src/testing/integration-tests.md:1
|
||||
msgid "# Integration Tests"
|
||||
msgstr ""
|
||||
msgstr "# 整合測試"
|
||||
|
||||
#: src/testing/integration-tests.md:3
|
||||
msgid "If you want to test your library as a client, use an integration test."
|
||||
msgstr ""
|
||||
msgstr "如果您要以用戶端身分測試程式庫,請採用整合測試。"
|
||||
|
||||
#: src/testing/integration-tests.md:5
|
||||
msgid "Create a `.rs` file under `tests/`:"
|
||||
msgstr ""
|
||||
msgstr "在 `tests/` 之下建立一個 `.rs` 檔案:"
|
||||
|
||||
#: src/testing/integration-tests.md:7
|
||||
msgid ""
|
||||
@ -9820,19 +9829,19 @@ msgstr ""
|
||||
|
||||
#: src/testing/integration-tests.md:16
|
||||
msgid "These tests only have access to the public API of your crate."
|
||||
msgstr ""
|
||||
msgstr "這些測試只能存取 crate 的公用 API。"
|
||||
|
||||
#: src/testing/useful-crates.md:1
|
||||
msgid "## Useful crates for writing tests"
|
||||
msgstr ""
|
||||
msgstr "## 有助於編寫測試的 crate"
|
||||
|
||||
#: src/testing/useful-crates.md:3
|
||||
msgid "Rust comes with only basic support for writing tests."
|
||||
msgstr ""
|
||||
msgstr "Rust 只提供基本的編寫測試支援。"
|
||||
|
||||
#: src/testing/useful-crates.md:5
|
||||
msgid "Here are some additional crates which we recommend for writing tests:"
|
||||
msgstr ""
|
||||
msgstr "以下列出幾個額外的 crate,建議您在編寫測試時使用:"
|
||||
|
||||
#: src/testing/useful-crates.md:7
|
||||
msgid ""
|
||||
@ -9842,6 +9851,11 @@ msgid ""
|
||||
"* [rstest](https://docs.rs/rstest): Support for fixtures and parameterised "
|
||||
"tests."
|
||||
msgstr ""
|
||||
"* [googletest](https://docs.rs/googletest):這是全面性的測試斷言程式庫,沿用"
|
||||
"了 GoogleTest (適用於 C++) 的傳統運作方式。\n"
|
||||
"* [proptest](https://docs.rs/proptest):讓您對 Rust 執行以屬性為基礎的測試"
|
||||
"。\n"
|
||||
"* [rstest](https://docs.rs/rstest):支援 Fixture 和參數化測試。"
|
||||
|
||||
#: src/unsafe.md:1
|
||||
msgid "# Unsafe Rust"
|
||||
|
Loading…
Reference in New Issue
Block a user