翻訳と辞書
Words near each other
・ Modality effect
・ Modalohr
・ MODAM
・ Modane
・ Modane Underground Laboratory
・ Modang language
・ Modansa
・ Modanville, New South Wales
・ Modara
・ Modares Expressway
・ Modarresi
・ Modarri
・ Modasa
・ Modasa (bus manufacturer)
・ Modasa (Vidhan Sabha constituency)
ModAssert
・ Modati Cinema
・ Modau
・ Modautal
・ Modave
・ Modball
・ ModBase
・ Modbury
・ Modbury Football Club
・ Modbury Heights, South Australia
・ Modbury High School
・ Modbury Hospital
・ Modbury North, South Australia
・ Modbury Priory
・ Modbury SC


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

ModAssert : ウィキペディア英語版
ModAssert

ModAssert is an open source C++ library of assertion macros and a framework to process assertions. It is developed by ''Q-Mentum''.〔(Q-Mentum )〕 The main difference from other assertion frameworks is that it can use Rich Booleans as well as ordinary conditions, allowing to decouple the behaviour of the assertion from the condition that it checks. Another difference is that it allows a developer to choose how failed assertions are handled by creating classes that implement the abstract base class ModAssert::Responder or ModAssert::Logger. Several implementations for various platforms of these are included. It also lets a developer add custom information when a failed assertion is processed by deriving from the abstract base class ModAssert::InfoProvider; several of these are provided, e.g. for the actual value of errno, the date and time, the amount of free memory, ...
It has a total of 144 different assertions. These can be divided in 9 basic types of assertions, that each have 16 variations. ModAssert makes a distinction between unexpected and expectes failures. Unexpected failures are failures due to programming errors, e.g. when a function returns an index to a container that is out of bounds. Expected failures are failures due to other conditions, e.g. a user entered a non-existing filename or a network connection could not be made. For unexpected failures there are the assertions MOD_ASSERT (removed in release versions), MOD_VERIFY (not removed in release versions), MOD_FAIL (without condition, always fails), MOD_VERIFY_V (returns a value in the condition) and MOD_VERIFY_B (returns true if the condition succeeded, false otherwise). For expected failures there are the similar macros MOD_CHECK, MOD_CHECK_FAIL, MOD_CHECK_V and MOD_CHECK_B, which are not removed for release versions.
These have variations that have one letter suffixes for each added capability. These are showing expressions if the assertion fails, offering an optional action to the user, assiging a group and or a level to the assertion, and ignoring default parameters. These four can be combined to make 16 variations of each basic assertion type.
ModAssert allows a developer to choose how failed assertions are reported. Typically this is a dialog box and or a log file. This allows the unit testing library UquoniTest to handle them somewhat differently, namely it reports failed assertions in domain code in a way similar to failed assertions in test code. UquoniTest can even check whether an assertion that is supposed to fail in certain condition, will actually fail.
== See also ==

*Rich Booleans

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「ModAssert」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.