久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='2lJS7'></tfoot>

    <i id='2lJS7'><tr id='2lJS7'><dt id='2lJS7'><q id='2lJS7'><span id='2lJS7'><b id='2lJS7'><form id='2lJS7'><ins id='2lJS7'></ins><ul id='2lJS7'></ul><sub id='2lJS7'></sub></form><legend id='2lJS7'></legend><bdo id='2lJS7'><pre id='2lJS7'><center id='2lJS7'></center></pre></bdo></b><th id='2lJS7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2lJS7'><tfoot id='2lJS7'></tfoot><dl id='2lJS7'><fieldset id='2lJS7'></fieldset></dl></div>
    <legend id='2lJS7'><style id='2lJS7'><dir id='2lJS7'><q id='2lJS7'></q></dir></style></legend>

    <small id='2lJS7'></small><noframes id='2lJS7'>

          <bdo id='2lJS7'></bdo><ul id='2lJS7'></ul>

        什么是 Google 測試、死亡測試

        What are Google Test, Death Tests(什么是 Google 測試、死亡測試)
        <legend id='y86Zm'><style id='y86Zm'><dir id='y86Zm'><q id='y86Zm'></q></dir></style></legend>

          <bdo id='y86Zm'></bdo><ul id='y86Zm'></ul>

        • <i id='y86Zm'><tr id='y86Zm'><dt id='y86Zm'><q id='y86Zm'><span id='y86Zm'><b id='y86Zm'><form id='y86Zm'><ins id='y86Zm'></ins><ul id='y86Zm'></ul><sub id='y86Zm'></sub></form><legend id='y86Zm'></legend><bdo id='y86Zm'><pre id='y86Zm'><center id='y86Zm'></center></pre></bdo></b><th id='y86Zm'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='y86Zm'><tfoot id='y86Zm'></tfoot><dl id='y86Zm'><fieldset id='y86Zm'></fieldset></dl></div>

          <small id='y86Zm'></small><noframes id='y86Zm'>

          <tfoot id='y86Zm'></tfoot>
            <tbody id='y86Zm'></tbody>

                • 本文介紹了什么是 Google 測試、死亡測試的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我看到該功能的文檔似乎非常重要,因為它位于 Google 測試概述功能中,并在:
                  https://github.com/google/googletest/blob/master/docs/advanced.md#death-tests

                  I saw the documentation of that feature is seem pretty major since it's in Google Test overview features and detailed in:
                  https://github.com/google/googletest/blob/master/docs/advanced.md#death-tests

                  它們看起來像標準的 assert() 但它們是 Google Test 的一部分,因此是一個 xUnit 測試框架.因此,我想知道使用這些死亡測試的真正用途或優勢是什么.

                  They look like standard assert() but they're part of Google Test, so a xUnit testing framework. Therefore, I wonder what the real usage or advantage of using those death tests are.

                  推薦答案

                  斷言是為了確認一個函數如果在當前進程中執行會導致程序終止(詳細說明死亡測試是從一個允許測試繼續進行的子進程,盡管死亡).這很有用,因為某些代碼可以保證程序在失敗時終止/中止(例如,如果存在不可恢復的錯誤),并且單元測試應確認函數遵守其記錄的行為,而不管它可能是什么.

                  The assertion is there to confirm that a function would bring about program termination if it were executed in the current process (the details explains that the death test is invoked from a subprocess which allows the tests to continue despite the death). This is useful because some code may guarantee program termination / abortion on failure (e.g. if there was an irrecoverable error), and unit tests should confirm that a function adheres to its documented behavior, regardless of what that might be.

                  wiki 頁面上的描述確實最好地解釋了它:

                  The description on the wiki page really explains it best:

                  在許多應用程序中,如果不滿足某個條件,斷言可能會導致應用程序失敗.這些確保程序處于已知良好狀態的健全性檢查會在某些程序狀態損壞后盡早失敗.如果斷言檢查了錯誤的條件,則程序可能會以錯誤的狀態繼續運行,這可能導致內存損壞、安全漏洞或更糟.因此,測試此類斷言語句是否按預期工作至關重要.

                  In many applications, there are assertions that can cause application failure if a condition is not met. These sanity checks, which ensure that the program is in a known good state, are there to fail at the earliest possible time after some program state is corrupted. If the assertion checks the wrong condition, then the program may proceed in an erroneous state, which could lead to memory corruption, security holes, or worse. Hence it is vitally important to test that such assertion statements work as expected.

                  這篇關于什么是 Google 測試、死亡測試的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區別)
                    <tbody id='5Ebo6'></tbody>
                  <i id='5Ebo6'><tr id='5Ebo6'><dt id='5Ebo6'><q id='5Ebo6'><span id='5Ebo6'><b id='5Ebo6'><form id='5Ebo6'><ins id='5Ebo6'></ins><ul id='5Ebo6'></ul><sub id='5Ebo6'></sub></form><legend id='5Ebo6'></legend><bdo id='5Ebo6'><pre id='5Ebo6'><center id='5Ebo6'></center></pre></bdo></b><th id='5Ebo6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5Ebo6'><tfoot id='5Ebo6'></tfoot><dl id='5Ebo6'><fieldset id='5Ebo6'></fieldset></dl></div>
                  <legend id='5Ebo6'><style id='5Ebo6'><dir id='5Ebo6'><q id='5Ebo6'></q></dir></style></legend>

                      1. <small id='5Ebo6'></small><noframes id='5Ebo6'>

                        <tfoot id='5Ebo6'></tfoot>

                            <bdo id='5Ebo6'></bdo><ul id='5Ebo6'></ul>
                            主站蜘蛛池模板: 亚洲网站在线观看 | 国产精品美女在线观看 | 91中文字幕在线 | 精品国产一区二区三区av片 | 免费xxxx大片国产在线 | h片免费在线观看 | 国产视频黄色 | 欧美一级久久精品 | 久久一区视频 | 亚洲欧美中文日韩在线v日本 | 在线日韩在线 | 中文字幕亚洲精品在线观看 | 五月网婷婷 | www.久久久久久久久久久久 | 国产精品一区二区免费 | www.青青草 | 午夜视频网| 新超碰97| 伊色综合久久之综合久久 | 91精品国产综合久久婷婷香蕉 | 日韩视频中文字幕 | 91视频在线观看 | 欧美日韩激情 | 日韩精品在线免费观看视频 | 福利国产 | 日韩在线免费 | 99自拍视频| 久久精品—区二区三区 | www久久久| 欧美多人在线 | 日韩亚洲欧美一区 | 久久一本 | 99久久亚洲 | 成人在线观看免费 | 亚洲精品久久久久国产 | 精品成人av | 中文在线一区二区 | 久久久久国产精品一区二区 | 毛片一级片| 亚洲一区二区三区免费在线观看 | 在线看91 |