diff --git a/cpp05/ex02/main.cpp b/cpp05/ex02/main.cpp index 94790f9..4942e51 100644 --- a/cpp05/ex02/main.cpp +++ b/cpp05/ex02/main.cpp @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/03/16 14:47:26 by rparodi #+# #+# */ -/* Updated: 2025/03/19 16:10:42 by rparodi ### ########.fr */ +/* Updated: 2025/03/19 17:13:07 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,8 @@ #include "ShrubberyCreationForm.hpp" #include "RobotomyRequestForm.hpp" +#define SCF_LAUNCH 5 + int main(void) { std::cout << YELLOW << "\t\t[ Testing with the grade 0 ]" << RESET << std::endl; try { @@ -70,13 +72,26 @@ int main(void) { std::cerr << RED << err.what() << RESET << std::endl; } std::cout << b2 << std::endl; - std::cout << std::endl << YELLOW << "\t\t[ Testing PresidentialPardonForm ]" << RESET << std::endl; + std::cout << std::endl << YELLOW << "\t\t[ Testing PresidentialPardonForm (With permissions) ]" << RESET << std::endl; PresidentialPardonForm ppf("Roger"); b2.executeForm(ppf); - std::cout << std::endl << YELLOW << "\t\t[ Testing ShrubberyCreationForm ]" << RESET << std::endl; + + std::cout << std::endl << YELLOW << "\t\t[ Testing PresidentialPardonForm (Without permissions) ]" << RESET << std::endl; + b1.executeForm(ppf); + + std::cout << std::endl << YELLOW << "\t\t[ Testing ShrubberyCreationForm (With permissions) ]" << RESET << std::endl; ShrubberyCreationForm scf("Roger"); - b2.executeForm(scf); - std::cout << std::endl << YELLOW << "\t\t[ Testing ShrubberyCreationForm ]" << RESET << std::endl; + b2.executeForm(scf); + + std::cout << std::endl << YELLOW << "\t\t[ Testing ShrubberyCreationForm (Without permissions) ]" << RESET << std::endl; + b1.executeForm(scf); + + std::cout << std::endl << YELLOW << "\t\t[ Testing RobotomyRequestForm (With permissions) ]" << RESET << std::endl; RobotomyRequestForm rrf("Roger"); - b2.executeForm(rrf); + for (int i = 0; i < SCF_LAUNCH; i++) { + b2.executeForm(rrf); + } + + std::cout << std::endl << YELLOW << "\t\t[ Testing RobotomyRequestForm (Without permissions) ]" << RESET << std::endl; + b1.executeForm(rrf); }