Unit testing with Eclipse System Workbench (STM32)
I suggest using something like CPPUTest. I have used this on CCS and I think the setup would be the same as it. 

For your installation of g++/gcc, I suggest using MINGW if your Cygwin installation does not work. For further information and in depth detail check out the CPPUTest Documentation