Home > The Execution Monitor >
PrevNext

Part I. Boost Test Library: The Execution Monitor

Table of Contents

Compilation
User's guide
Reference

Sometimes we need to call a function and make sure that no user or system originated exceptions are being thrown by it. Uniform exception reporting is also may be convenient. That's the purpose of the Boost.Test's Execution Monitor.
有時我們需要調用一個函數,並且保證沒有用戶或系統產生的異常被拋出。 統一的異常報告也可能會很有用。 這就是 Boost.Test 的執行監視器 (Execution Monitor) 的作用。

The Execution Monitor is a lower-level component of the Boost Test Library. It is the base for implementing all other Boost.Test components, but also can be used standalone to get controlled execution of error-prone functions with a uniform error notification. The Execution Monitor calls a user-supplied function in a controlled environment, relieving users from messy error detection.
Execution Monitor 是 Boost Test 庫的一個低層次組件。 它是 Boost.Test 其它組件實現的基礎,但同樣可以單獨使用,用統一的錯誤通知來控制有可能出錯的 (error-prone) 函數的執行。 Execution Monitor 在可控的環境下調用用戶提供的函數,將用戶從繁瑣的錯誤檢查中解放出來。

The Execution Monitor usage is demonstrated in the example exec_mon_example . Additional examples are in Part II, 「The Program Execution Monitor」 or Part IV, 「The Unit Test Framework」.

Design Rationale 設計原理

The Execution Monitor design assumes that it can be used when no (or almost no) memory available. Also the Execution Monitor is intended to be portable to as many platforms as possible.
Execution Monitor 被設計為在沒有 (或幾乎沒有) 內存的情況下也可以使用。 同樣,Execution Monitor 同樣試圖在盡可能多的平台上移植。

Last revised: , at


PrevUpHomeNext