British swimmer Adam Peaty tested positive a day after he narrowly missed out on 100 metres breaststroke gold, sharing silver with American Nic Fink.