#include"adt_set.cpp" #include"set.cpp" #include"concurrent_set.cpp" #define TEST_CASE_COUNT 1000 enum program {adt_set, test_one_set, one_thread_set, n_thread_set, concurrent_set}; int run_adt_set(){ ADT_Set adt_set = ADT_Set(); operation test_case[6] = { { methodname::add, 1, true }, { methodname::add, 1, false }, { methodname::ctn, 1, true }, { methodname::rmv, 1, true }, { methodname::ctn, 1, false }, { methodname::rmv, 1, false } }; for (operation op : test_case) { adt_set.do_op(&op); } return 0; } int run_N_thread_set(int N) { int worker_count = N; thread *worker= new thread[worker_count]; operation test_case[TEST_CASE_COUNT]; fill_with_operations(test_case, TEST_CASE_COUNT); thread monitor = thread(monitor_func,test_case, worker_count); for (int i=0;i