Question

The UnitTest++ library directly states: "the following platforms are supported:

Win32
Linux
Mac OS X"

However, has anyone tried it out on Win CE environment?

I am getting various compiler errors related to Win APIs. e.g.

BOOL GetProcessAffinityMask( HANDLE hProcess, PDWORD_PTR lpProcessAffinityMask, PDWORD_PTR lpSystemAffinityMask );

DWORD_PTR SetThreadAffinityMask( HANDLE hThread, DWORD_PTR dwThreadAffinityMask );

etc.

Was it helpful?

Solution 2

All(or most of) the Win32 APIs used in UnitTest++ were related to timer, and if we ignore those API using preprocessor directives(for Win CE Environment), it gets compiled successfully.

Now while executing the Test, we came across another issue that printf function doesn't give output on WinCE terminal. So we replaced all printf function with OutputDebugString() and were able to execute test and see result on terminal like PuTTY. However the timing tests wouldn't work anymore, which wasn't the requirement for us right now.

OTHER TIPS

So you try to compile UnitTest++ using a Windows CE environment?

Windows CE is different from Win32. It supports just a subset of the Windows Desktop API. So the statement that UnitTest++ supports Win32 does not imply that it supports Windows CE. Since the two API functions you mention are just available on Window XP desktop API (see MSDN) the compilations of UnitTest++ fails.

So you may have some options:
- modify UnitTest++ to support Windows CE (maybe not possible)
- use another Unit Test framework that supports Windows CE explicitly
- compile UnitTest++ for Windows Desktop and run your UnitTest there

I hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top