From edc05d9f4f32c09840871594dcf151883701990b Mon Sep 17 00:00:00 2001 From: Alexandre POMMIER Date: Thu, 4 Aug 2022 13:59:52 +0200 Subject: [PATCH] cpp04 add test --- cpp04/ex00/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cpp04/ex00/main.cpp b/cpp04/ex00/main.cpp index 0e20734..9e63159 100644 --- a/cpp04/ex00/main.cpp +++ b/cpp04/ex00/main.cpp @@ -6,7 +6,7 @@ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/07/14 02:04:10 by apommier #+# #+# */ -/* Updated: 2022/08/03 13:26:10 by apommier ### ########.fr */ +/* Updated: 2022/08/04 13:59:07 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,25 +21,26 @@ int main() const Animal* meta = new Animal(); const Animal* j = new Dog(); const Animal* i = new Cat(); - std::cout << j->getType() << " " << std::endl; - std::cout << i->getType() << " " << std::endl; + std::cout << std::endl << j->getType() << " " << std::endl; + std::cout << i->getType() << " " << std::endl << std::endl; i->makeSound(); //will output the cat sound! j->makeSound(); //will output the dog sound! meta->makeSound();//will output the animal sound! + std::cout << std::endl; delete meta; delete j; delete i; - std::cout << std::endl; const WrongAnimal* meta2 = new WrongAnimal(); const WrongAnimal* falseWrongCat = new WrongCat(); const WrongCat* realWrongCat = new WrongCat(); - std::cout << falseWrongCat->getType() << " " << std::endl; + std::cout << std::endl << falseWrongCat->getType() << " " << std::endl << std::endl; falseWrongCat->makeSound(); //will output the WrongAnimal sound! meta2->makeSound(); //same realWrongCat->makeSound();//will output the WrongCat sound! + std::cout << std::endl; delete realWrongCat; delete meta2;