/** * Locate the PID of our process using the */ TEST(Process_List_Test, find_our_process_in_set) { std::vector<DWORD> v; initialize_process_list(v, find_in_set, CopyPID()); size_t size(v.size()); EXPECT_EQ(size, 1u); // Please, don't run multiple test executables simultaneously ASSERT_GE(size, 1u); }
/** * The only process we are really guaranteed to have is this test process itself. * This test uses the generic filter function. */ TEST(Process_List_Test, find_our_process_CI_as_used) { std::vector<PROCESSENTRY32W> v; initialize_process_list(v, process_by_any_file_name_CI(FileNameSet(multiple_exe_names)), CopyAll()); size_t size(v.size()); EXPECT_EQ(1u, size); // Please, don't run multiple test executables simultaneously ASSERT_GE(1u, size); }
/** * The only process we are really guaranteed to have is this test process itself. * This test uses same one used in Process_Closer */ TEST(Process_List_Test, find_our_process_CI_generic) { std::vector<PROCESSENTRY32W> v; initialize_process_list(v, process_by_name_CI(mixedcase_exe_name), CopyAll()); size_t size(v.size()); EXPECT_EQ(1u, size); // Please, don't run multiple test executables simultaneously ASSERT_GE(1u, size); }
/** * The only process we are really guaranteed to have is this test process itself. */ TEST( Process_List_Test, find_our_process ) { std::vector< PROCESSENTRY32W > v ; initialize_process_list( v, our_process_by_name(), copy_all() ) ; size_t size( v.size() ); EXPECT_EQ( 1u, size ); // Please, don't run multiple test executables simultaneously ASSERT_GE( 1u, size ); }
/** * Construction test ensures that we don't throw and that at least one process shows up. */ TEST(Process_List_Test, construct_vector) { std::vector<PROCESSENTRY32W> v; initialize_process_list(v, EveryProcess(), CopyAll()); ASSERT_GE(v.size(), 1u); }
void initialize_process_list( std::vector< T > & v, Admittance admit = Admittance(), Extractor extract = Extractor() ) { initialize_process_list( v, ProcessSnapshot(), admit, extract ) ; }