⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 null_unittest_.h

📁 用STL的方式封装了WindowsAPI、COM调用、ACE、ATL、MFC、WTL等多种组件
💻 H
字号:

// Updated: 11th September 2005

// Thanks:  Martin J Moene, for the test cases

#if !defined(STLSOFT_INCL_STLSOFT_HPP_NULL)
# error This file cannot be directly included, and should only be included within stlsoft/null.hpp
#endif /* !STLSOFT_INCL_STLSOFT_HPP_NULL */

#if !defined(STLSOFT_UNITTEST)
# error This file cannot be included when not unit-testing STLSoft
#endif /* !STLSOFT_UNITTEST */

namespace unittest
{
    namespace
    {
        struct A
        {
           int f();
        };

        ss_bool_t test_stlsoft_null(unittest_reporter *r)
        {
            ss_bool_t               bSuccess    =   true;

            unittest_initialiser    init(r, "STLSoft", "null", __FILE__);

#ifdef _STLSOFT_NULL_v_DEFINED

            int *pi         =   NULL_v();
            int *pci        =   NULL_v();
# ifdef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
            int (A::*fp)()  =   NULL_v();
# endif /* _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT */

# if 0
            if(<<TODO>>)
            {
                r->report("<<TODO>> failed", __LINE__);
                bSuccess = false;
            }
# endif /* 0 */

# ifdef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
            STLSOFT_SUPPRESS_UNUSED(fp);
# endif /* _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT */
            STLSOFT_SUPPRESS_UNUSED(pci);
            STLSOFT_SUPPRESS_UNUSED(pi);

#endif /* _STLSOFT_NULL_v_DEFINED */

            return bSuccess;
        }

        unittest_registrar    unittest_stlsoft_null(test_stlsoft_null);
    } // anonymous namespace

} // namespace unittest

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -