int main(void) { const struct CMUnitTest tests[] = { SECURITY_UTEST( test_request_credentials_fails_with_null_creds), SECURITY_UTEST( test_request_credentials_succeeds_with_good_values), SECURITY_UTEST( test_request_credentials_fails_if_drpc_connect_fails), SECURITY_UTEST( test_request_credentials_connects_to_default_socket), SECURITY_UTEST( test_request_credentials_fails_if_drpc_call_fails), SECURITY_UTEST( test_request_credentials_calls_drpc_call), SECURITY_UTEST( test_request_credentials_closes_socket_when_call_ok), SECURITY_UTEST( test_request_credentials_closes_socket_when_call_fails), SECURITY_UTEST( test_request_credentials_fails_if_reply_null), SECURITY_UTEST( test_request_credentials_fails_if_reply_status_failure), SECURITY_UTEST( test_request_credentials_fails_if_reply_body_malformed), SECURITY_UTEST( test_request_credentials_fails_if_reply_token_missing), SECURITY_UTEST( test_request_credentials_returns_raw_bytes), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(new_folder_files_zeroCount), cmocka_unit_test(folder_add_new_file_filesCount_oneCount), cmocka_unit_test(folder_add_new_file_filesCount_threeCount), cmocka_unit_test(new_dictionary_wordsCount_zerowords), cmocka_unit_test(process_and_remove_file_wordscount_in_dictionary_fivewords), cmocka_unit_test(process_and_remove_file_wordscount_in_dictionary_fivewords_and_one_word_passing_two_times), cmocka_unit_test(process_and_remove_file_wordscount_in_dictionary_twentywords), cmocka_unit_test(process_and_remove_file_filesCount_zeroCount), }; dic_t * dictionary = dic_new(); folder_t * myFolder = folder_new("Go"); file_t * FirstFile = folder_add_new_file(myFolder, "This file is empty bitch!"); file_t * SecondFile = folder_add_new_file(myFolder, "This file is not empty , first file also is not empty, bitch!alliluya"); folder_process_and_remove_files(myFolder, FirstFile, dictionary); folder_process_and_remove_files(myFolder, SecondFile, dictionary); printf("dictionary:::\n"); printdic(dictionary); folder_free(myFolder); dic_free(dictionary); return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_assert_return_code_fail), }; return cmocka_run_group_tests(tests, NULL, NULL); }
void runTests(void){ const struct CMUnitTest tests[] = { cmocka_unit_test(create_void_zeroCount), cmocka_unit_test(addSentenceToEnd_oneString_countOne), cmocka_unit_test(addSentenceByIndex_hasTwoAddedSentencesAddingOneNewSentenceToZeroIndex_testIfWasAdded), cmocka_unit_test(addSentenceByIndex_hasTwoAddedSentencesAddingOneNewSentenceToIndexOne_testIfWasAdded), cmocka_unit_test(addSentenceByIndex__NonExistingIndex__putsINDEX_OUT_OF_BOUNDtoStatus), cmocka_unit_test(addSentenceByIndex__nullSentencePointer__putsNULL_POINTERtoStatus), cmocka_unit_test(addSentenceToEnd__nullSentencePointer__putsNULL_POINTERtoStatus), cmocka_unit_test(setSentenceByIndex_hasOneAddedSentenceSettingNewSentenceInstead_testIfHasChanged), cmocka_unit_test(setSentenceByIndex__NonExistingIndex__putsINDEX_OUT_OF_BOUNDtoStatus), cmocka_unit_test(setSentenceByIndex__nullSentencePointer__putsNULL_POINTERtoStatus), cmocka_unit_test(deleteSentenceByIndex_hasOneAddedSentenceDeletingIt_zeroCount), cmocka_unit_test(deleteSentenceByIndex__DeletingNonExistingIndex__putsINDEX_OUT_OF_BOUNDtoStatus), cmocka_unit_test(getSentence_hasOneAddedSentence_returnsAddedSentence), cmocka_unit_test(getText_hasThreeAddedSentences_returnsText), cmocka_unit_test(getSentenceAmount_hasThreeAddedSentences_returnsCount), cmocka_unit_test(getWordsAmountInText_hasSomeAddedSentences_returnsWordsCount), cmocka_unit_test(getStatus__callingNULL_POINTERerror__returnStatus), cmocka_unit_test(getStatus__callingINDEX_OUT_OF_BOUNDerror__returnStatus), cmocka_unit_test(getStatus__addingNon_NULLsentenceToProperIndexToGetOKstatus__returnStatus), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(check_dtls_window_uninit_0), cmocka_unit_test(check_dtls_window_uninit_large), cmocka_unit_test(check_dtls_window_uninit_very_large), cmocka_unit_test(check_dtls_window_12), cmocka_unit_test(check_dtls_window_21), cmocka_unit_test(check_dtls_window_19), cmocka_unit_test(check_dtls_window_91), cmocka_unit_test(check_dtls_window_large_21), cmocka_unit_test(check_dtls_window_large_12), cmocka_unit_test(check_dtls_window_large_19), cmocka_unit_test(check_dtls_window_large_91), cmocka_unit_test(check_dtls_window_dup1), cmocka_unit_test(check_dtls_window_dup2), cmocka_unit_test(check_dtls_window_dup3), cmocka_unit_test(check_dtls_window_outside), cmocka_unit_test(check_dtls_window_large_outside), cmocka_unit_test(check_dtls_window_out_of_order), cmocka_unit_test(check_dtls_window_epoch_lower), cmocka_unit_test(check_dtls_window_epoch_higher), cmocka_unit_test(check_dtls_window_very_large_12), cmocka_unit_test(check_dtls_window_very_large_19), cmocka_unit_test(check_dtls_window_very_large_91), cmocka_unit_test(check_dtls_window_very_large_outside), cmocka_unit_test(check_dtls_window_skip3), cmocka_unit_test(check_dtls_window_skip1) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_record), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown( test_objectSID_in_domain, setup, teardown), cmocka_unit_test_setup_teardown( test_objectSID_not_in_domain, setup, teardown), cmocka_unit_test_setup_teardown( test_no_objectSID, setup, teardown), cmocka_unit_test_setup_teardown( test_modify_no_objectSID, setup, teardown), cmocka_unit_test_setup_teardown( test_modify_of_objectSID_not_replicated, setup, teardown), cmocka_unit_test_setup_teardown( test_modify_of_objectSID_replicated, setup, teardown), }; cmocka_set_message_output(CM_OUTPUT_SUBUNIT); return cmocka_run_group_tests(tests, NULL, NULL); }
int main(int argc, const char *argv[]) { poptContext pc; int opt; int rv; struct poptOption long_options[] = { POPT_AUTOHELP SSSD_DEBUG_OPTS POPT_TABLEEND }; const struct CMUnitTest tests[] = { cmocka_unit_test(test_deskprofile_get_filename_path), }; /* Set debug level to invalid value so we can decide if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { switch(opt) { default: fprintf(stderr, "\nInvalid option %s: %s\n\n", poptBadOption(pc, 0), poptStrerror(opt)); poptPrintUsage(pc, stderr, 0); return 1; } } poptFreeContext(pc); DEBUG_CLI_INIT(debug_level); rv = cmocka_run_group_tests(tests, NULL, NULL); return rv; }
int main(int argc, char** argv){ (void)argc; (void)argv; const struct CMUnitTest tests[22]={ cmocka_unit_test(test_grf_array_new), cmocka_unit_test(test_grf_array_new_1D), cmocka_unit_test(test_grf_array_new_2D), cmocka_unit_test(test_grf_array_new_3D), cmocka_unit_test(test_grf_array_new_4D), cmocka_unit_test(test_grf_array_new_1D_type), cmocka_unit_test(test_grf_array_new_2D_type), cmocka_unit_test(test_grf_array_new_3D_type), cmocka_unit_test(test_grf_array_new_4D_type), cmocka_unit_test(test_grf_array_copy), cmocka_unit_test(test_grf_array_from_data), cmocka_unit_test(test_grf_array_zeros), cmocka_unit_test(test_grf_array_ones), cmocka_unit_test(test_grf_array_sub), cmocka_unit_test(test_grf_array_reduce), cmocka_unit_test(test_grf_array_ops), cmocka_unit_test(test_grf_array_indices_manip), cmocka_unit_test(test_grf_array_get_long_double), cmocka_unit_test(test_grf_array_io_csv), cmocka_unit_test(test_grf_array_conversion), cmocka_unit_test(test_grf_array_squeeze), cmocka_unit_test(test_grf_array_circular_indices), cmocka_unit_test(test_grf_array_norm), }; return cmocka_run_group_tests(tests,NULL,NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_ascii), cmocka_unit_test(test_capitals), cmocka_unit_test(test_multilang), cmocka_unit_test(test_special_char), cmocka_unit_test(test_space_replacement), cmocka_unit_test(test_invalid), cmocka_unit_test(test_normalization1), cmocka_unit_test(inv_test_ascii), cmocka_unit_test(inv_test_special_char), cmocka_unit_test(inv_test_invalid), cmocka_unit_test(test_other_chars), cmocka_unit_test(test_spaces), cmocka_unit_test(test_compatibility), cmocka_unit_test(test_symbols), cmocka_unit_test(test_invalid_ignorable1), cmocka_unit_test(test_invalid_ignorable2), cmocka_unit_test(test_invalid_ignorable3), cmocka_unit_test(test_invalid_exception1), cmocka_unit_test(test_invalid_exception2), cmocka_unit_test(test_invalid_exception3), cmocka_unit_test(test_invalid_exception4), cmocka_unit_test(test_invalid_join_control), cmocka_unit_test(inv_test_invalid_exception1), cmocka_unit_test(inv_test_invalid_exception3), cmocka_unit_test(inv_test_invalid_exception4), cmocka_unit_test(inv_test_invalid_join_control) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(int argc, char const** argv) { const struct CMUnitTest test[] = { cmocka_unit_test(init), cmocka_unit_test(push_back), cmocka_unit_test(push_back_10_values), cmocka_unit_test(push_back_1000_values), cmocka_unit_test(clear), cmocka_unit_test(clear_and_push_back), cmocka_unit_test(empty), cmocka_unit_test(foreach), cmocka_unit_test(destroy), cmocka_unit_test(multiple_destroy), cmocka_unit_test(capacity), cmocka_unit_test(delete_if), cmocka_unit_test(delete_if_double), cmocka_unit_test(delete_if_last), cmocka_unit_test(delete_if_first), cmocka_unit_test(at), cmocka_unit_test(at_out_of_range), cmocka_unit_test(data), cmocka_unit_test(resize), cmocka_unit_test(resize_fail), }; (void)argc; (void)argv; return (cmocka_run_group_tests(test, 0, 0)); }
int main(VOID) { int ret = 0; const struct CMUnitTest VMCASrvPlugin_Tests[] = { cmocka_unit_test_setup_teardown( VMCAPluginInitialize_Valid, NULL, NULL), cmocka_unit_test_setup_teardown( VMCAPluginInitialize_NoEntryPoint, NULL, NULL), cmocka_unit_test_setup_teardown( VMCAPluginInitialize_InvalidVTable, NULL, NULL), }; ret = cmocka_run_group_tests(VMCASrvPlugin_Tests, NULL, NULL); if (ret) { fail_msg("%s", "VMCA plugin tests failed"); } return ret; }
int torture_run_tests(void) { int rc; struct CMUnitTest tests[] = { cmocka_unit_test(torture_growing_buffer), cmocka_unit_test(torture_growing_buffer_shifting), cmocka_unit_test(torture_buffer_prepend), cmocka_unit_test(torture_ssh_buffer_get_ssh_string), cmocka_unit_test(torture_ssh_buffer_add_format), cmocka_unit_test(torture_ssh_buffer_get_format), cmocka_unit_test(torture_ssh_buffer_get_format_error), cmocka_unit_test(torture_buffer_pack_badformat), cmocka_unit_test(torture_mixed), }; /* * If the library is statically linked, ssh_init() is not called * automatically */ ssh_init(); torture_filter_tests(tests); rc = cmocka_run_group_tests(tests, NULL, NULL); ssh_finalize(); return rc; }
int torture_run_tests(void) { int rc; struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown(torture_hostkey_rsa, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_hostkey_ed25519, session_setup, session_teardown), #ifdef HAVE_ECC cmocka_unit_test_setup_teardown(torture_hostkey_ecdsa, session_setup, session_teardown), #endif #ifdef HAVE_DSA cmocka_unit_test_setup_teardown(torture_hostkey_dss, session_setup, session_teardown), #endif /* the client is able to handle SHA2 extension (if negotiated) */ cmocka_unit_test_setup_teardown(torture_hostkey_rsa_sha256, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_hostkey_rsa_sha512, session_setup, session_teardown), }; ssh_init(); torture_filter_tests(tests); rc = cmocka_run_group_tests(tests, sshd_setup, sshd_teardown); ssh_finalize(); return rc; }
int main(VOID) { int ret = 0; const struct CMUnitTest tests[] = { cmocka_unit_test(Test_LwCAInitCA_Valid), cmocka_unit_test(Test_LwCAInitCA_Invalid), cmocka_unit_test(Test_LwCACreateRootCA_Valid), cmocka_unit_test(Test_LwCACreateRootCA_Invalid), cmocka_unit_test(Test_LwCAGetCACertificates_Valid), cmocka_unit_test(Test_LwCAGetCACertificates_Invalid), cmocka_unit_test(Test_LwCAGetSignedCertificate_Valid), cmocka_unit_test(Test_LwCAGetSignedCertificate_Invalid), cmocka_unit_test(Test_LwCACreateIntermediateCA_Valid), cmocka_unit_test(Test_LwCACreateIntermediateCA_Invalid), cmocka_unit_test(Test_LwCARevokeCertificate_Valid), cmocka_unit_test(Test_LwCARevokeCertificate_Invalid), cmocka_unit_test(Test_LwCARevokeIntermediateCA_Valid), cmocka_unit_test(Test_LwCARevokeIntermediateCA_Invalid), cmocka_unit_test(Test_LwCAGetCACrl_Valid), cmocka_unit_test(Test_LwCAGetCACrl_Invalid), }; ret = cmocka_run_group_tests(tests, Test_LwCAAPITests_Setup, Test_LwCAAPI_Teardown); if (ret) { fail_msg("%s", "MutentCA API tests failed"); } return ret; }
int main() { const struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown(test_resume_yield_status, test_setup, test_teardown), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int torture_run_tests(void) { int rc; struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown(torture_knownhosts_export, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_knownhosts_write_and_verify, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_knownhosts_precheck, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_knownhosts_other, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_knownhosts_unknown, session_setup, session_teardown), cmocka_unit_test_setup_teardown(torture_knownhosts_conflict, session_setup, session_teardown), }; ssh_init(); torture_filter_tests(tests); rc = cmocka_run_group_tests(tests, sshd_group_setup, sshd_group_teardown); ssh_finalize(); return rc; }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown(test_instid_unlink, setup_f, teardown_f) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_add), cmocka_unit_test(test_subtract), cmocka_unit_test(test_multiply), cmocka_unit_test(test_divide), cmocka_unit_test(test_divide_by_zero), cmocka_unit_test(test_find_operator_function_by_string_null_functions), cmocka_unit_test(test_find_operator_function_by_string_null_string), cmocka_unit_test(test_find_operator_function_by_string_valid_null_functions), cmocka_unit_test(test_find_operator_function_by_string_not_found), cmocka_unit_test(test_find_operator_function_by_string_found), cmocka_unit_test(test_perform_operation_null_args), cmocka_unit_test(test_perform_operation_null_operator_functions), cmocka_unit_test(test_perform_operation_null_number_of_intermediate_values), cmocka_unit_test(test_perform_operation_null_intermediate_values), cmocka_unit_test(test_perform_operation_no_arguments), cmocka_unit_test(test_perform_operation_first_arg_not_integer), cmocka_unit_test(test_perform_operation_unknown_operator), cmocka_unit_test(test_perform_operation_missing_argument), cmocka_unit_test(test_perform_operation_no_integer_after_operator), cmocka_unit_test(test_perform_operation), cmocka_unit_test(test_example_main_no_args), cmocka_unit_test(test_example_main), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_low_paging), cmocka_unit_test(test_high_paging), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest UnitTest[] = { cmocka_unit_test(interface_alloc_func), cmocka_unit_test(interface_free_func), }; return cmocka_run_group_tests(UnitTest, NULL, NULL); }
static int test_all_coco_runtime_c(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_coco_set_log_level) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_merge_uint8), cmocka_unit_test(test_split_uint16), cmocka_unit_test(test_convert_adc_10bit) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(int argc, char *argv[]) { const struct CMUnitTest tests[] = { cmocka_unit_test(Test0) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(int argc, char** argv){ (void)argc; (void)argv; const struct CMUnitTest tests[1]={ cmocka_unit_test(test_grf_imagewidget_show) }; return cmocka_run_group_tests(tests,NULL,NULL); }
int main() { const struct CMUnitTest tests[] = { cmocka_unit_test_setup_teardown(sysrepo_daemon_test, test_setup, test_teardown), }; return cmocka_run_group_tests(tests, NULL, NULL); }
static int test_all_coco_suite(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_coco_suite_encode_problem_index) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main() { const struct CMUnitTest tests[] = { cmocka_unit_test(getNLastMsges__fiveMessages__messagesAdded), }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(test_rtr_send_reset_query), cmocka_unit_test(test_rtr_change_socket_state) }; return cmocka_run_group_tests(tests, NULL, NULL); }
int main() { const struct CMUnitTest tests[] = { cmocka_unit_test(coverage) }; return cmocka_run_group_tests(tests, NULL, NULL); }