Cooperative relaying has been shown as a promising approach to leverage the transmit diversity that is traditionally realized by installing multiple antennas on a single device. In digital relaying, one of the key issues is that relays might receive in error, resulting in error propagation to the destination. Despite error detection codes can be used to prevent error propagation, performing error detection algorithms incurs delay and processing overhead at relays. An alternative approach is to set a threshold value, whereby the relay forwards when the instantaneous signal-to-noise ratio (SNR) exceeds the threshold. Most existing threshold-based relaying schemes implicitly assume the relays are placed in the middle between the source and the destination, whereby a single threshold is applied to the source-relay channel for making the cooperation decision. In infrastructureless wireless networks, relays may be randomly distributed in the network and thus, the relaying scheme based on a single threshold may choose the relay with a weak one-hop channel to forward that degrades diversity combining. In this paper, a threshold digital relaying scheme based on double testing is proposed where both the source-relay and the relay-destination channels are tested to select the cooperating relays. The end-toend bit error rate (BER) performance is derived theoretically, and compared with simulation results. Different network topologies are considered to demonstrate the superior performance of the proposed double testing digital relaying scheme over the single testing schemes.