A numerical study of finite-size scaling for first-order phase transitions