This contribution deals with code-aided hypothesis testing for wireless digital receivers. We provide a theoretical justification for a hypothesis testing algorithm that was previously introduced in [1] based on ad-hoc arguments. Contrary to conventional hypothesis testing methods, the algorithm from [1] exploits the code structure within the received signal and does not require any pilot symbols. By doing so, it allows to improve the bandwidth-efficiency of the transmission. The present contribution shows that, under mild conditions, the performance of the algorithm from [1] coincides with the performance of the optimal Maximum A Posteriori (MAP) hypotesis test. Computer simulations support this result.