remove \r
[extl.git] / extl / functional / unit_test / func_ptr_test.h
blob85e66daaaa5efaa29bea6415cdc4a341a6248240
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: func_ptr_test.h
4 * Created: 08.06.11
5 * Updated: 08.06.11
7 * Brief: func_ptr unit-testing
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
13 #ifndef EXTL_FUNCTIONAL_FUNC_PTR_TEST_H
14 #define EXTL_FUNCTIONAL_FUNC_PTR_TEST_H
16 #ifndef EXTL_FUNCTIONAL_FUNC_PTR_H
17 # error This file must be included of func_ptr_test.h
18 #endif
20 /* ///////////////////////////////////////////////////////////////////////
21 * ::extl::unit_test namespace
23 EXTL_TEST_BEGIN_NAMESPACE
25 struct func_ptr_test
27 static void func(e_tchar_t const* str)
29 EXTL_TEST_TRACE(str);
31 func_ptr_test()
33 EXTL_TEST_TRACE(_T("func_ptr_test:"));
35 typedef func_ptr<void (*)(e_tchar_t const*)> func_ptr_type;
37 func_ptr_type fp(&func);
38 log_base< e_tchar_t, func_ptr_type ,EXTL_LOG_RECORD_MAX_SIZE> log(fp);
39 log.report(_T("run func"));
43 func_ptr_test g_func_ptr_test;
45 /* ///////////////////////////////////////////////////////////////////////
46 * ::extl::unit_test namespace
48 EXTL_TEST_END_NAMESPACE
50 /* //////////////////////////////////////////////////////////////////// */
51 #endif /* EXTL_FUNCTIONAL_FUNC_PTR_TEST_H */
52 /* //////////////////////////////////////////////////////////////////// */