remove \r
[extl.git] / extl / win / counter / unit_test / multimedia_counter_test.h
blob6d4cc78908e8a5b200c6f5f74c4db6c111a0b470
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: multimedia_counter_test.h
4 * Created: 08.02.17
5 * Updated: 08.05.06
7 * Brief: Unit-testing
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_PLATFORM_WIN_MULTIMEDIA_COUNTER_TEST_H
13 #define EXTL_PLATFORM_WIN_MULTIMEDIA_COUNTER_TEST_H
15 #ifndef EXTL_PLATFORM_WIN_MULTIMEDIA_COUNTER_H
16 # error This file must be included of multimedia_counter.h
17 #endif
19 /* ///////////////////////////////////////////////////////////////////////
20 * ::unit_test namespace
22 EXTL_TEST_BEGIN_NAMESPACE
24 /* ///////////////////////////////////////////////////////////////////////
25 * Unit-testing
27 struct multimedia_counter_test
29 multimedia_counter_test()
31 multimedia_counter counter;
32 counter.begin();
33 Sleep(100);
34 counter.end();
35 EXTL_TEST_TRACE(_T("/* //////////////////////////////////////////////////////////////////// */"));
36 EXTL_TEST_TRACE(_T("multimedia_counter Test(100ms):\n"));
37 EXTL_TEST_TRACE(_T("Count: %u"), static_cast<e_uint32_t>(counter.count()));
38 EXTL_TEST_TRACE(_T("Seconds: %u"), static_cast<e_uint32_t>(counter.s()));
39 EXTL_TEST_TRACE(_T("MS: %u"), static_cast<e_uint32_t>(counter.ms()));
40 EXTL_TEST_TRACE(_T("US: %u"), static_cast<e_uint32_t>(counter.us()));
44 multimedia_counter_test g_multimedia_counter_test;
46 /* ///////////////////////////////////////////////////////////////////////
47 * ::unit_test namespace
49 EXTL_TEST_END_NAMESPACE
51 /* //////////////////////////////////////////////////////////////////// */
52 #endif /* EXTL_PLATFORM_WIN_MULTIMEDIA_COUNTER_TEST_H */
53 /* //////////////////////////////////////////////////////////////////// */