FGX.Asserts.TfgAssert: различия между версиями
Перейти к навигации
Перейти к поиску
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 14: | Строка 14: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
+ | |} | ||
+ | |||
+ | == Методы == | ||
+ | |||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsTrue(const AValue: Boolean, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsFalse(const AValue: Boolean, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsNotNil(const AValue: IInterface, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsNotNil(const AValue: TObject, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsNotNil(const AValue: TClass, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>IsClass(const AValue: TObject, const AClass: TClass, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>Implements(const AValue: TObject, const AInterface: TGUID, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>InRange(const AValue: Integer, const ALow: Integer, const AHigh: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>InRange(const AValue: Extended, const ALow: Extended, const AHigh: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>InRange(const AValue: Single, const ALow: Single, const AHigh: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickLessThan(const AValue: Integer, const AHigh: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickLessThan(const AValue: Extended, const AHigh: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickLessThan(const AValue: Single, const AHigh: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickMoreThan(const AValue: Integer, const ALow: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickMoreThan(const AValue: Extended, const ALow: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>StrickMoreThan(const AValue: Single, const ALow: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>LessAndEqualThan(const AValue: Integer, const AHigh: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>LessAndEqualThan(const AValue: Extended, const AHigh: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>LessAndEqualThan(const AValue: Single, const AHigh: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>MoreAndEqualThan(const AValue: Integer, const ALow: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>MoreAndEqualThan(const AValue: Extended, const ALow: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>MoreAndEqualThan(const AValue: Single, const ALow: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>AreEqual(const AValue1: Integer, const AValue2: Integer, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>AreEqual(const AValue1: Extended, const AValue2: Extended, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>AreEqual(const AValue1: Single, const AValue2: Single, const AMessage: string)</code> | ||
+ | |||
+ | |- | ||
+ | | <code>procedure</code> || <code>Fail(const AMessage: string)</code> | ||
+ | |||
|} | |} |
Версия 23:49, 9 июня 2019
Delphi
TfgAssert = class (TObject)
Описание
Класс проверки контрактов в коде библиотеке. Отвечает за выполнение базовых проверок. Работает только в DEBUG конфигурации. Во всех остальных проверки вырезаются. По умолчанию, все нарушения выводятся в системный лог устройства.
Конструкторы
Методы
procedure |
IsTrue(const AValue: Boolean, const AMessage: string)
|
procedure |
IsFalse(const AValue: Boolean, const AMessage: string)
|
procedure |
IsNotNil(const AValue: IInterface, const AMessage: string)
|
procedure |
IsNotNil(const AValue: TObject, const AMessage: string)
|
procedure |
IsNotNil(const AValue: TClass, const AMessage: string)
|
procedure |
IsClass(const AValue: TObject, const AClass: TClass, const AMessage: string)
|
procedure |
Implements(const AValue: TObject, const AInterface: TGUID, const AMessage: string)
|
procedure |
InRange(const AValue: Integer, const ALow: Integer, const AHigh: Integer, const AMessage: string)
|
procedure |
InRange(const AValue: Extended, const ALow: Extended, const AHigh: Extended, const AMessage: string)
|
procedure |
InRange(const AValue: Single, const ALow: Single, const AHigh: Single, const AMessage: string)
|
procedure |
StrickLessThan(const AValue: Integer, const AHigh: Integer, const AMessage: string)
|
procedure |
StrickLessThan(const AValue: Extended, const AHigh: Extended, const AMessage: string)
|
procedure |
StrickLessThan(const AValue: Single, const AHigh: Single, const AMessage: string)
|
procedure |
StrickMoreThan(const AValue: Integer, const ALow: Integer, const AMessage: string)
|
procedure |
StrickMoreThan(const AValue: Extended, const ALow: Extended, const AMessage: string)
|
procedure |
StrickMoreThan(const AValue: Single, const ALow: Single, const AMessage: string)
|
procedure |
LessAndEqualThan(const AValue: Integer, const AHigh: Integer, const AMessage: string)
|
procedure |
LessAndEqualThan(const AValue: Extended, const AHigh: Extended, const AMessage: string)
|
procedure |
LessAndEqualThan(const AValue: Single, const AHigh: Single, const AMessage: string)
|
procedure |
MoreAndEqualThan(const AValue: Integer, const ALow: Integer, const AMessage: string)
|
procedure |
MoreAndEqualThan(const AValue: Extended, const ALow: Extended, const AMessage: string)
|
procedure |
MoreAndEqualThan(const AValue: Single, const ALow: Single, const AMessage: string)
|
procedure |
AreEqual(const AValue1: Integer, const AValue2: Integer, const AMessage: string)
|
procedure |
AreEqual(const AValue1: Extended, const AValue2: Extended, const AMessage: string)
|
procedure |
AreEqual(const AValue1: Single, const AValue2: Single, const AMessage: string)
|
procedure |
Fail(const AMessage: string)
|