Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PrintTasksInfo(TasksInfo tasks_info) {
- cout << tasks_info[TaskStatus::NEW] << "/"s
- << tasks_info[TaskStatus::IN_PROGRESS] << "/"s
- << tasks_info[TaskStatus::TESTING] << "/"s
- << tasks_info[TaskStatus::DONE] << ""s << endl;
- }
- int main() {
- TeamTasks tasks;
- for (int i = 0; i < 5; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- TasksInfo updated_tasks, untouched_tasks;
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 6);
- cout << "PerformPersonTasks(6)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 1200; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 2; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 2; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 16; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 1206);
- cout << "PerformPersonTasks(1206)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 1; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 2; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 3; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 4; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 1000);
- cout << "PerformPersonTasks(1000)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 1; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 1);
- cout << "PerformPersonTasks(1)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 1; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 12; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 3; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 100);
- cout << "PerformPersonTasks(100)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 5; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 5; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 5; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 10);
- cout << "PerformPersonTasks(10)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- for (int i = 0; i < 5; ++i) {
- tasks.AddNewTask("Ivan"s);
- }
- for (int i = 0; i < 5; ++i) {
- tasks.AddIN_PROGRESSTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddTESTINGTask("Ivan"s);
- }
- for (int i = 0; i < 0; ++i) {
- tasks.AddDONEask("Ivan"s);
- }
- cout << "Ivan's tasks before: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- tie(updated_tasks, untouched_tasks) = tasks.PerformPersonTasks("Ivan"s, 5);
- cout << "PerformPersonTasks(5)" << endl;
- cout << "Updated Ivan's tasks: "s;
- PrintTasksInfo(updated_tasks);
- cout << "Untouched Ivan's tasks: "s;
- PrintTasksInfo(untouched_tasks);
- cout << "Ivan's tasks after: "s;
- PrintTasksInfo(tasks.GetPersonTasksInfo("Ivan"s));
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement