From: Philipp Meier Date: 2002-10-04T03:37:55+09:00 Subject: Re: Reusing base classes tests? --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 04, 2002 at 02:06:06AM +0900, Phlip wrote: > >> Classes, however, should follow LSP, so tests a base class should pass > >> the derived class should pass too. >=20 > Philipp Meier wrote: >=20 > > How should Truck pass CarTest? Or should TruckTest inherite from CarTest > > and override test_wheels? Would this be according to LSP? >=20 > LSP means the caller (in this case the test engine) can't tell we called= =20 > one test or another. That's fine because tests should not push side-effec= ts=20 > into the engine. Ok, now I unterstood. Keeping the Car metaphor LSP meens e.g. that the method "turn_key_to_off_position" should not e.g. turn off the lights in the car class but do so in the truck class!? (Consider turning of the lights as a possible side-effect.) -billy. --=20 Meisterbohne S=F6flinger Stra=DFe 100 Tel: +49-731-399 499-0 eL=F6sungen 89077 Ulm Fax: +49-731-399 499-9 --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQE9nI50fBriNoqItSYRAr4gAJ9oI3nScEhFlwi3grRO8lISNWnA2gCfU7UU H4ttyd5/myMy2/phI5DcddU= =Od3c -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--