Lhaz
静的公開メンバ関数 | 非公開メンバ関数 | 全メンバ一覧
WinUnit::Assert クラス

#include <WinUnit.h>

静的公開メンバ関数

template<class T , class U >
static void AreEqual (const TCHAR *expectedExpressionString, const T &expectedExpressionValue, const TCHAR *actualExpressionString, const U &actualExpressionValue, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
template<class T , class U >
static void AreNotEqual (const TCHAR *notExpectedExpressionString, const T &notExpectedExpressionValue, const TCHAR *actualExpressionString, const U &actualExpressionValue, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void StringEqual (const wchar_t *expected, const wchar_t *actual, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void StringEqual (const char *expected, const char *actual, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
template<class T >
static void IsZero (const TCHAR *zeroExpressionString, const T &zeroExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
template<class T >
static void IsNotZero (const TCHAR *nonzeroExpressionString, const T &nonzeroExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
template<class T >
static void IsNull (const TCHAR *expressionString, T *nullExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
template<class T >
static void IsNotNull (const TCHAR *notNullExpressionString, T *notNullExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void Fail (const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void IsTrue (const TCHAR *expressionString, bool trueExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void IsFalse (const TCHAR *expressionString, bool falseExpression, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void WinapiSucceeded (const TCHAR *expressionString, bool success, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 
static void ThrowsException (const TCHAR *expressionString, const TCHAR *exceptionType, bool exceptionWasThrown, const TCHAR *fileName, int lineNumber, const TCHAR *message=NULL,...)
 

非公開メンバ関数

 ‾Assert ()
 

詳解

This is the class (with only static methods) which sort of mimics .NET's Assert class. You do not need to use this class directly– use the WIN_ASSERT* macros instead (see Assert Macros and Functions). You can use this class as an example for your own assert implementations.

関数詳解

◆ AreEqual()

template<class T , class U >
void WinUnit::Assert::AreEqual ( const TCHAR *  expectedExpressionString,
const T &  expectedExpressionValue,
const TCHAR *  actualExpressionString,
const U &  actualExpressionValue,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ AreNotEqual()

template<class T , class U >
void WinUnit::Assert::AreNotEqual ( const TCHAR *  notExpectedExpressionString,
const T &  notExpectedExpressionValue,
const TCHAR *  actualExpressionString,
const U &  actualExpressionValue,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ Fail()

void WinUnit::Assert::Fail ( const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsFalse()

void WinUnit::Assert::IsFalse ( const TCHAR *  expressionString,
bool  falseExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsNotNull()

template<class T >
void WinUnit::Assert::IsNotNull ( const TCHAR *  notNullExpressionString,
T *  notNullExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsNotZero()

template<class T >
void WinUnit::Assert::IsNotZero ( const TCHAR *  nonzeroExpressionString,
const T &  nonzeroExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsNull()

template<class T >
void WinUnit::Assert::IsNull ( const TCHAR *  expressionString,
T *  nullExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsTrue()

void WinUnit::Assert::IsTrue ( const TCHAR *  expressionString,
bool  trueExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ IsZero()

template<class T >
void WinUnit::Assert::IsZero ( const TCHAR *  zeroExpressionString,
const T &  zeroExpression,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ StringEqual() [1/2]

void WinUnit::Assert::StringEqual ( const wchar_t *  expected,
const wchar_t *  actual,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ StringEqual() [2/2]

void WinUnit::Assert::StringEqual ( const char *  expected,
const char *  actual,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ ThrowsException()

void WinUnit::Assert::ThrowsException ( const TCHAR *  expressionString,
const TCHAR *  exceptionType,
bool  exceptionWasThrown,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ WinapiSucceeded()

void WinUnit::Assert::WinapiSucceeded ( const TCHAR *  expressionString,
bool  success,
const TCHAR *  fileName,
int  lineNumber,
const TCHAR *  message = NULL,
  ... 
)
inlinestatic

◆ ‾Assert()

WinUnit::Assert::‾Assert ( )
private

このクラス詳解は次のファイルから抽出されました: