feat: adding tests
This commit is contained in:
parent
5d81e1e176
commit
25ce5bdf0c
1 changed files with 21 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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;
|
||||
|
||||
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");
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue