add typecasting to RTEST macro