add crosplatform main function definition macros and remake all tests