nlib
総合概要
諸情報
モジュール
名前空間
クラス
ファイル
各種例
ファイル一覧
ファイルメンバ
testing.h
[詳解]
1
2
#pragma once
3
#ifndef INCLUDE_NN_NLIB_TESTING_TESTING_H_
4
#define INCLUDE_NN_NLIB_TESTING_TESTING_H_
5
6
#include "
nn/nlib/Config.h
"
7
8
#ifndef NLIB_USE_GTEST
9
#include "
nn/nlib/testing/NTest.h
"
10
#include "
nn/nlib/testing/Pred.h
"
11
#include "
nn/nlib/testing/Printer.h
"
12
#include "
nn/nlib/testing/ParamValue.h
"
13
#include "
nn/nlib/testing/ParamType.h
"
14
15
namespace
testing = ::nlib_ns::testing;
16
NLIB_NAMESPACE_BEGIN
17
namespace
testing {
18
inline
void
InitGoogleTest(
int
* argc,
char
** argv) {
InitNintendoTest
(argc, argv); }
19
inline
void
InitGoogleTest(
int
* argc,
wchar_t
** argv) {
InitNintendoTest
(argc, argv); }
20
#define NLIB_TESTING_OSTREAM ::nlib_ns::testing::detail_func::DummyStream
21
}
// namespace testing
22
NLIB_NAMESPACE_END
23
#else
24
// See: https://code.google.com/p/googletest/
25
#include "gtest/gtest.h"
26
27
#define NLIB_TESTING_OSTREAM std::ostream
28
namespace
testing {
29
inline
void
InitNintendoTest
(
int
* argc,
char
** argv) { InitGoogleTest(argc, argv); }
30
inline
void
InitNintendoTest
(
int
* argc,
wchar_t
** argv) { InitGoogleTest(argc, argv); }
31
}
32
33
#endif
34
35
#endif // INCLUDE_NN_NLIB_TESTING_TESTING_H_
Printer.h
テスト失敗時の表示を制御します。
ParamValue.h
値をパラメータ化したテストを定義しています。
nn::nlib::testing::InitNintendoTest
void InitNintendoTest(int *argc, char **argv)
テストプログラムのコマンドラインオプションを処理します。
ParamType.h
型付けテストを定義しています。
Config.h
開発環境別の設定が書かれるファイルです。
NTest.h
基本的な単体テスト用マクロが定義されています。
Pred.h
述語アサーションが定義されています。
© 2013, 2014, 2015 Nintendo Co., Ltd. All rights reserved.