Use assertions and unit tests as executable documentation to stamp out bugs 使用斷言和單元測試作為可執(zhí)行文檔來消除錯誤
August 2001 , eric allen shows you how to use assertions and unit tests as executable documentation , 2001年8月) , eric allen向您顯示了如何將斷言和單元測試用作可執(zhí)行文檔。
Eric allen shows you how to use assertions and unit tests as executable documentation , making your code safer and more portable Eric allen向您顯示了如何使用斷言和單元測試作為可執(zhí)行文檔,使您的代碼更安全,可移植性更強。
Using temporal assertions as added executable documentation on interfaces to catch fictitious implementations of the interface as soon as the assertions are violated 將時態(tài)斷言用作接口上附加的可執(zhí)行文檔,以便在違反斷言時立即捕捉接口的臆想實現(xiàn)。
One of the most straightforward applications of temporal logic assertions is for adding executable documentation on interfaces , thereby catching fictitious implementations of the interface as soon as these assertions are violated 時態(tài)邏輯斷言最直接的應用是在接口上添加可執(zhí)行文檔,從而在一旦違反這些斷言時就立即捕捉接口的