Gravitational-wave observations as a tool for testing relativistic gravity