75 lines
2.0 KiB
C++
75 lines
2.0 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/06/19 01:13:45 by mmoussou #+# #+# */
|
|
/* Updated: 2025/06/29 20:48:03 by mmoussou ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "Form.hpp"
|
|
#include "Bureaucrat.hpp"
|
|
|
|
int main(void)
|
|
{
|
|
try
|
|
{
|
|
Form test("test form", 175, 15);
|
|
std::cout << test << std::endl;
|
|
}
|
|
catch (std::exception& e)
|
|
{
|
|
std::cout << "Exception : " << e.what() << std::endl;
|
|
}
|
|
std::cout << std::endl;
|
|
|
|
try
|
|
{
|
|
Form test("test form", 120, 10);
|
|
Form test2(test);
|
|
Bureaucrat tester("john", 1);
|
|
std::cout << test << std::endl;
|
|
std::cout << test2 << std::endl;
|
|
tester.signForm(test2);
|
|
std::cout << test << std::endl;
|
|
std::cout << test2 << std::endl << std::endl;
|
|
}
|
|
catch (std::exception& e)
|
|
{
|
|
std::cout << "Exception : " << e.what() << std::endl;
|
|
}
|
|
std::cout << std::endl;
|
|
|
|
try
|
|
{
|
|
Form test;
|
|
Bureaucrat tester;
|
|
|
|
std::cout << test << std::endl;
|
|
tester.signForm(test);
|
|
std::cout << test << std::endl;
|
|
tester.signForm(test);
|
|
}
|
|
catch (std::exception& e)
|
|
{
|
|
std::cout << "Exception : " << e.what() << std::endl;
|
|
}
|
|
std::cout << std::endl;
|
|
|
|
try
|
|
{
|
|
Form test("some form", 149, 149);
|
|
Bureaucrat tester;
|
|
|
|
std::cout << test << std::endl;
|
|
tester.signForm(test);
|
|
}
|
|
catch (std::exception& e)
|
|
{
|
|
std::cout << "Exception : " << e.what() << std::endl;
|
|
}
|
|
}
|