iutest  1.17.99.14
disabledtest.cpp
//======================================================================
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//======================================================================
#include "../include/iutest.hpp"
/* ---------------------------------------------------
* Diabled Test
*//*--------------------------------------------------*/
IUTEST(TestDisabled, DISABLED_Test1)
{
// disable
}
IUTEST(TestDisabled, Test2)
{
// enable
}
IUTEST(DISABLED_TestCaseDisabled, Test1)
{
// disable
}
IUTEST(DISABLED_TestCaseDisabled, Test2)
{
// disable
}
// DISABLED Test Tips.
#define DISABLED_MacroTest EnabledTest
#define MacroTest DISABLED_Test
IUTEST(DISABLED_MacroTest, Enable)
{
}
IUTEST(EnabledTest, Count)
{
const ::iutest::TestCase* testcase = ::iuutil::GetCurrentTestSuite();
IUTEST_ASSERT_EQ(2, testcase->total_test_count());
IUTEST_ASSERT_EQ(2, testcase->test_to_run_count());
IUTEST_ASSERT_EQ(0, testcase->disabled_test_count());
IUTEST_ASSERT_TRUE(testcase->Passed());
IUTEST_ASSERT_FALSE(testcase->Failed());
}
IUTEST(MacroTest, NotRun)
{
}
class EnabledTestFixed : public ::iutest::Test {};
typedef EnabledTestFixed DISABLED_TestFixed;
#define MacroTestF DISABLED_TestFixed
#define DISABLED_MacroTestF EnabledTestFixed
IUTEST_F(MacroTestF, NotRun)
{
}
IUTEST_F(DISABLED_MacroTestF, Run)
{
}
IUTEST_F(EnabledTestFixed, Count)
{
const ::iutest::TestCase* testcase = ::iuutil::GetCurrentTestSuite();
IUTEST_ASSERT_EQ(2, testcase->total_test_count());
IUTEST_ASSERT_EQ(2, testcase->test_to_run_count());
IUTEST_ASSERT_EQ(0, testcase->disabled_test_count());
IUTEST_ASSERT_TRUE(testcase->Passed());
IUTEST_ASSERT_FALSE(testcase->Failed());
}
テストベース
Definition: iutest_body.hpp:44
#define IUTEST_ASSERT_NOTNULL(...)
NOT NULL テスト
Definition: iutest.hpp:406
#define IUTEST_ASSERT_EQ(expected, actual)
== テスト
Definition: iutest.hpp:308
#define IUTEST_ASSERT_TRUE(...)
TRUE テスト
Definition: iutest.hpp:369
#define IUTEST_ASSERT_FALSE(...)
FALSE テスト
Definition: iutest.hpp:381
#define IUTEST(testsuite_, testname_)
テスト関数定義マクロ
Definition: iutest.hpp:72
#define IUTEST_F(testfixture_, testname_)
ユーザー指定テスト関数定義マクロ
Definition: iutest.hpp:81
const ::iutest::TestSuite * GetCurrentTestSuite()
現在の TestSuite を取得
Definition: iutest_util_tests.hpp:99