Fix platform dependent test cases