예제 #1
0
int main(void)
{
   UnityBegin("test/test_queen_attack.c");

   RUN_TEST(test_invalid_if_on_same_position);
   RUN_TEST(test_white_queen_must_have_row_on_board);
   RUN_TEST(test_white_queen_must_have_column_on_board);
   RUN_TEST(test_black_queen_must_have_row_on_board);
   RUN_TEST(test_black_queen_must_have_column_on_board);
   RUN_TEST(test_can_not_attack);
   RUN_TEST(test_can_attack_on_same_row);
   RUN_TEST(test_can_attack_on_same_column);
   RUN_TEST(test_can_attack_on_first_diagonal);
   RUN_TEST(test_can_attack_on_second_diagonal);
   RUN_TEST(test_can_attack_on_third_diagonal);
   RUN_TEST(test_can_attack_on_fourth_diagonal);

   return UnityEnd();
}
예제 #2
0
int main(void)
{
  UnityBegin("test/test_bob.c");

  RUN_TEST(test_stating_something);
  RUN_TEST(test_shouting);
  RUN_TEST(test_asking_a_question);
  RUN_TEST(test_talking_forcefully);
  RUN_TEST(test_using_acronyms_in_regular_speech);
  RUN_TEST(test_forceful_questions);
  RUN_TEST(test_shouting_numbers);
  RUN_TEST(test_only_numbers);
  RUN_TEST(test_question_with_only_numbers);
  RUN_TEST(test_shouting_with_special_characters);
  RUN_TEST(test_shouting_with_no_exclamation_mark);
  RUN_TEST(test_statement_containing_question_mark);
  RUN_TEST(test_prattling_on);
  RUN_TEST(test_question_with_trailing_whitespace);
  RUN_TEST(test_silence);
  RUN_TEST(test_prolonged_silence);
  RUN_TEST(test_not_all_silence);

  UnityEnd();
  return 0;
}
예제 #3
0
bool TestExtClass::RunTests(const std::string &which) {
  bool ret = true;

  DECLARE_TEST_FUNCTIONS("class test implements itestable {"
                         "  public $foo;"
                         "  protected $prop;"
                         "  private $bar;"
                         "  public function foo() {}"
                         "  protected function func() {}"
                         "  function bar() {}"
                         "  const const_foo = 'f';"
                         "}"
                         "interface itestable {"
                         "  function foo();"
                         "  function bar();"
                         "}"
                        );

  RUN_TEST(test_get_declared_classes);
  RUN_TEST(test_get_declared_interfaces);
  RUN_TEST(test_class_exists);
  RUN_TEST(test_interface_exists);
  RUN_TEST(test_get_class_methods);
  RUN_TEST(test_get_class_vars);
  RUN_TEST(test_get_class_constants);
  RUN_TEST(test_get_class);
  RUN_TEST(test_get_parent_class);
  RUN_TEST(test_is_a);
  RUN_TEST(test_is_subclass_of);
  RUN_TEST(test_method_exists);
  RUN_TEST(test_property_exists);
  RUN_TEST(test_get_object_vars);
  RUN_TEST(test_call_user_method_array);
  RUN_TEST(test_call_user_method);

  return ret;
}
//=======MAIN=====
int main(void)
{
  Unity.TestFile = "test_Interpret.c";
  UnityBegin();
  RUN_TEST(test_extractValue_should_return_correct_value_in_integer, 26);
  RUN_TEST(test_extractValue_should_throw_error_with_empty_argument, 39);
  RUN_TEST(test_extractValue_should_throw_error_with_empty_argument_semicolon, 52);
  RUN_TEST(test_extractValue_should_get_thrown_in_evaluate, 65);
  RUN_TEST(test_extractValue_should_supports_FsFd_instruction, 79);
  RUN_TEST(test_extractDestination_should_return_correct_value_in_integer, 92);
  RUN_TEST(test_extractDestination_should_throw_error_with_empty_argument, 107);
  RUN_TEST(test_extractDestination_should_throw_error_with_empty_argument_semicolon, 120);
  RUN_TEST(test_extractDestination_should_get_value_from_evaluate, 133);
  RUN_TEST(test_extractDestination_should_get_value_from_F, 148);
  RUN_TEST(test_extractAccessBanked_should_return_correct_value_in_integer, 184);
  RUN_TEST(test_extractAccessBanked_should_throw_error_with_empty_argument, 201);
  RUN_TEST(test_extractAccessBanked_should_throw_error_with_empty_argument_semicolon, 223);
  RUN_TEST(test_extractAccessBaked_should_get_value_from_ACCESS, 246);
  RUN_TEST(test_extractAccessBanked_should_get_value_from_evaluate, 267);
  RUN_TEST(test_extractValue_should_able_to_throw_NO_ARGUMENT_for_both, 290);
  RUN_TEST(test_extractValue_should_able_to_throw_EMPTY_ARGUMENT, 314);
  RUN_TEST(test_extractValue_should_able_to_throw_NO_ARGUMENT, 338);
  RUN_TEST(test_getInstruction_should_get_opCode_RLNCF, 362);
  RUN_TEST(test_getInstruction_should_get_opCode_RETLW, 371);
  RUN_TEST(test_interpret_should_able_to_get_correct_value, 380);
  RUN_TEST(test_interpret_should_throw_an_error_for_unexist_instruction, 391);
  RUN_TEST(test_interpret_should_throw_an_error_for_invalid_input_instruction, 403);

  return (UnityEnd());
}
bool TestExtVariable::RunTests(const std::string &which) {
  bool ret = true;

  DECLARE_TEST_FUNCTIONS("");

  RUN_TEST(test_is_bool);
  RUN_TEST(test_is_int);
  RUN_TEST(test_is_integer);
  RUN_TEST(test_is_long);
  RUN_TEST(test_is_double);
  RUN_TEST(test_is_float);
  RUN_TEST(test_is_numeric);
  RUN_TEST(test_is_real);
  RUN_TEST(test_is_string);
  RUN_TEST(test_is_scalar);
  RUN_TEST(test_is_array);
  RUN_TEST(test_is_object);
  RUN_TEST(test_is_resource);
  RUN_TEST(test_is_null);
  RUN_TEST(test_gettype);
  RUN_TEST(test_get_resource_type);
  RUN_TEST(test_intval);
  RUN_TEST(test_doubleval);
  RUN_TEST(test_floatval);
  RUN_TEST(test_strval);
  RUN_TEST(test_settype);
  RUN_TEST(test_print_r);
  RUN_TEST(test_var_export);
  RUN_TEST(test_var_dump);
  RUN_TEST(test_debug_zval_dump);
  RUN_TEST(test_serialize);
  RUN_TEST(test_unserialize);
  RUN_TEST(test_get_defined_vars);
  RUN_TEST(test_import_request_variables);
  RUN_TEST(test_extract);

  return ret;
}
예제 #6
0
bool TestExtString::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_addcslashes);
  RUN_TEST(test_stripcslashes);
  RUN_TEST(test_addslashes);
  RUN_TEST(test_stripslashes);
  RUN_TEST(test_bin2hex);
  RUN_TEST(test_hex2bin);
  RUN_TEST(test_nl2br);
  RUN_TEST(test_quotemeta);
  RUN_TEST(test_str_shuffle);
  RUN_TEST(test_strrev);
  RUN_TEST(test_strtolower);
  RUN_TEST(test_strtoupper);
  RUN_TEST(test_ucfirst);
  RUN_TEST(test_ucwords);
  RUN_TEST(test_strip_tags);
  RUN_TEST(test_trim);
  RUN_TEST(test_ltrim);
  RUN_TEST(test_rtrim);
  RUN_TEST(test_chop);
  RUN_TEST(test_explode);
  RUN_TEST(test_implode);
  RUN_TEST(test_join);
  RUN_TEST(test_str_split);
  RUN_TEST(test_chunk_split);
  RUN_TEST(test_strtok);
  RUN_TEST(test_str_replace);
  RUN_TEST(test_str_ireplace);
  RUN_TEST(test_substr_replace);
  RUN_TEST(test_substr);
  RUN_TEST(test_str_pad);
  RUN_TEST(test_str_repeat);
  RUN_TEST(test_wordwrap);
  RUN_TEST(test_html_entity_decode);
  RUN_TEST(test_htmlentities);
  RUN_TEST(test_htmlspecialchars_decode);
  RUN_TEST(test_htmlspecialchars);
  RUN_TEST(test_quoted_printable_encode);
  RUN_TEST(test_quoted_printable_decode);
  RUN_TEST(test_convert_uudecode);
  RUN_TEST(test_convert_uuencode);
  RUN_TEST(test_str_rot13);
  RUN_TEST(test_crc32);
  RUN_TEST(test_crypt);
  RUN_TEST(test_md5);
  RUN_TEST(test_sha1);
  RUN_TEST(test_strtr);
  RUN_TEST(test_convert_cyr_string);
  RUN_TEST(test_get_html_translation_table);
  RUN_TEST(test_hebrev);
  RUN_TEST(test_hebrevc);
  RUN_TEST(test_setlocale);
  RUN_TEST(test_localeconv);
  RUN_TEST(test_nl_langinfo);
  RUN_TEST(test_printf);
  RUN_TEST(test_vprintf);
  RUN_TEST(test_sprintf);
  RUN_TEST(test_vsprintf);
  RUN_TEST(test_sscanf);
  RUN_TEST(test_chr);
  RUN_TEST(test_ord);
  RUN_TEST(test_money_format);
  RUN_TEST(test_number_format);
  RUN_TEST(test_strcmp);
  RUN_TEST(test_strncmp);
  RUN_TEST(test_strnatcmp);
  RUN_TEST(test_strcasecmp);
  RUN_TEST(test_strncasecmp);
  RUN_TEST(test_strnatcasecmp);
  RUN_TEST(test_strcoll);
  RUN_TEST(test_substr_compare);
  RUN_TEST(test_strchr);
  RUN_TEST(test_strrchr);
  RUN_TEST(test_strstr);
  RUN_TEST(test_stristr);
  RUN_TEST(test_strpbrk);
  RUN_TEST(test_strpos);
  RUN_TEST(test_stripos);
  RUN_TEST(test_strrpos);
  RUN_TEST(test_strripos);
  RUN_TEST(test_substr_count);
  RUN_TEST(test_strspn);
  RUN_TEST(test_strcspn);
  RUN_TEST(test_strlen);
  RUN_TEST(test_count_chars);
  RUN_TEST(test_str_word_count);
  RUN_TEST(test_levenshtein);
  RUN_TEST(test_similar_text);
  RUN_TEST(test_soundex);
  RUN_TEST(test_metaphone);
  RUN_TEST(test_parse_str);

  return ret;
}
//=======MAIN=====
int main(void)
{
  Unity.TestFile = "test_IOROperation.c";
  UnityBegin();
  RUN_TEST(test_iorwf_file_over_0_or_255, 11);
  RUN_TEST(test_iorwf_operand2_is_0_bsr_out_of_range_should_throw_error, 30);
  RUN_TEST(test_iorwf_operand2_is_3_should_throw_error, 52);
  RUN_TEST(test_iorwf_operand2_is_negative_six_should_throw_error, 74);
  RUN_TEST(test_iorwf_operand3_should_throw_error_with_value_negative_two, 96);
  RUN_TEST(test_iorwf_operand3_should_throw_error_with_value_negative_three, 118);
  RUN_TEST(test_iorwf_operand3_should_throw_error_with_W, 140);
  RUN_TEST(test_iorwf_operand3_should_throw_error_with_F, 162);
  RUN_TEST(test_iorwf_operand2_is_1_bsr_out_of_range_should_throw_error, 184);
  RUN_TEST(test_iorwf_operand2_negative_one_and_operand3_negative_one, 211);
  RUN_TEST(test_iorwf_operand2_0_wreg_and_operand3_negative_one, 231);
  RUN_TEST(test_iorwf_operand2_negative_one_and_operand3_0, 250);
  RUN_TEST(test_iorwf_operand2_0_in_wreg_and_operand3_0_access_bank, 270);
  RUN_TEST(test_iorwf_operand2_1_in_file_register_and_operand3_0_access_bank, 290);
  RUN_TEST(test_iorwf_operand2_0_in_wreg_and_operand3_1_bank_select_register, 309);
  RUN_TEST(test_iorwf_operand2_1_in_file_register_and_operand3_banked_keyword, 330);
  RUN_TEST(test_iorwf_operand2_W_in_file_register_and_operand3_access, 350);
  RUN_TEST(test_iorwf_operand2_F_in_file_register_and_operand3_access, 368);
  RUN_TEST(test_iorwf_operand2_1_in_file_register_and_operand3_access, 386);
  RUN_TEST(test_iorwf_operand2_F_in_file_register_and_operand3_banked_keyword, 404);
  RUN_TEST(test_iorwf_operand2_W_in_file_register_and_operand3_banked_keyword, 423);
  RUN_TEST(test_iorwf_operand1_0_and_wreg_0_status_will_get_1, 447);
  RUN_TEST(test_iorwf_operand1_is_negative_value_and_wreg_0_status_will_get_80, 468);

  return (UnityEnd());
}
예제 #8
0
bool TestExtError::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_debug_backtrace);
  RUN_TEST(test_debug_print_backtrace);
  RUN_TEST(test_error_get_last);
  RUN_TEST(test_error_log);
  RUN_TEST(test_error_reporting);
  RUN_TEST(test_restore_error_handler);
  RUN_TEST(test_restore_exception_handler);
  RUN_TEST(test_set_error_handler);
  RUN_TEST(test_set_exception_handler);
  RUN_TEST(test_trigger_error);
  RUN_TEST(test_user_error);

  return ret;
}
예제 #9
0
//=======MAIN=====
int main(void)
{
  Unity.TestFile = "test_flashProg.c";
  UnityBegin();
  RUN_TEST(test_PGD_high, 54);
  RUN_TEST(test_PGD_low, 60);
  RUN_TEST(test_PGC_high, 66);
  RUN_TEST(test_PGC_low, 72);
  RUN_TEST(test_enter_HVP, 78);
  RUN_TEST(test_exit_HVP, 87);
  RUN_TEST(test_MCLR_low, 102);
  RUN_TEST(test_MCLR_high, 109);
  RUN_TEST(test_PGM_high, 116);
  RUN_TEST(test_PGM_low, 123);
  RUN_TEST(test_enableWrite, 130);
  RUN_TEST(test_flashSetAddress_should_select_0x102030, 136);
  RUN_TEST(test_flashWriteToBuffer_2bytes_of_data, 148);
  RUN_TEST(test_flashWriteAndProgram_2bytes_of_data, 155);
  RUN_TEST(test_flashRead16Bits_should_read_2bytes_and_return_0x1001, 164);
  RUN_TEST(test_flashReadBlock_should_read_64bits, 174);
  RUN_TEST(test_flashWriteBlock_should_write, 185);
  RUN_TEST(test_rowErase_should_erase_row, 203);

  return (UnityEnd());
}
예제 #10
0
bool TestParserExpr::RunTests(const std::string &which) {
  bool ret = true;
  RUN_TEST(TestExpressionList);
  RUN_TEST(TestAssignmentExpression);
  RUN_TEST(TestSimpleVariable);
  RUN_TEST(TestDynamicVariable);
  RUN_TEST(TestStaticMemberExpression);
  RUN_TEST(TestArrayElementExpression);
  RUN_TEST(TestStringOffsetExpression);
  RUN_TEST(TestDynamicFunctionCall);
  RUN_TEST(TestSimpleFunctionCall);
  RUN_TEST(TestScalarExpression);
  RUN_TEST(TestObjectPropertyExpression);
  RUN_TEST(TestObjectMethodExpression);
  RUN_TEST(TestListAssignment);
  RUN_TEST(TestNewObjectExpression);
  RUN_TEST(TestUnaryOpExpression);
  RUN_TEST(TestBinaryOpExpression);
  RUN_TEST(TestQOpExpression);
  RUN_TEST(TestArrayPairExpression);
  RUN_TEST(TestClassConstantExpression);
  RUN_TEST(TestParameterExpression);
  RUN_TEST(TestModifierExpression);
  RUN_TEST(TestConstant);
  RUN_TEST(TestEncapsListExpression);
  RUN_TEST(TestClosure);
  RUN_TEST(TestAwaitExpression);

  RUN_TEST(TestXHP);

  return ret;
}
예제 #11
0
int main(void)
{
  Unity.TestFile = __FILE__;
  UnityBegin();

  // RUN_TEST calls runTest
  RUN_TEST(test_BasicTryDoesNothingIfNoThrow, 12);
  RUN_TEST(test_BasicThrowAndCatch, 30);
  RUN_TEST(test_BasicThrowAndCatch_WithMiniSyntax, 49);
  RUN_TEST(test_VerifyVolatilesSurviveThrowAndCatch, 69);
  RUN_TEST(test_ThrowFromASubFunctionAndCatchInRootFunc, 98);
  RUN_TEST(test_ThrowAndCatchFromASubFunctionAndRethrowToCatchInRootFunc, 139);
  RUN_TEST(test_ThrowAndCatchFromASubFunctionAndNoRethrowToCatchInRootFunc, 158);
  RUN_TEST(test_ThrowAnErrorThenEnterATryBlockFromWithinCatch_VerifyThisDoesntCorruptExceptionId, 175);
  RUN_TEST(test_ThrowAnErrorThenEnterATryBlockFromWithinCatch_VerifyThatEachExceptionIdIndependent, 193);
  RUN_TEST(test_CanHaveMultipleTryBlocksInASingleFunction, 220);
  RUN_TEST(test_CanHaveNestedTryBlocksInASingleFunction_ThrowInside, 245);
  RUN_TEST(test_CanHaveNestedTryBlocksInASingleFunction_ThrowOutside, 269);

  UnityEnd();
  
  return 0;
}
예제 #12
0
int main (void)
{
  RUN_TEST(simple);

  END_TEST;
}
예제 #13
0
bool TestExtDatetime::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_checkdate);
  RUN_TEST(test_date_add);
  RUN_TEST(test_date_create_from_format);
  RUN_TEST(test_date_create);
  RUN_TEST(test_date_date_set);
  RUN_TEST(test_date_default_timezone_get);
  RUN_TEST(test_date_default_timezone_set);
  RUN_TEST(test_date_diff);
  RUN_TEST(test_date_format);
  RUN_TEST(test_date_get_last_errors);
  RUN_TEST(test_date_interval_create_from_date_string);
  RUN_TEST(test_date_interval_format);
  RUN_TEST(test_date_isodate_set);
  RUN_TEST(test_date_modify);
  RUN_TEST(test_date_offset_get);
  RUN_TEST(test_date_parse);
  RUN_TEST(test_date_sub);
  RUN_TEST(test_date_sun_info);
  RUN_TEST(test_date_sunrise);
  RUN_TEST(test_date_sunset);
  RUN_TEST(test_date_time_set);
  RUN_TEST(test_date_timestamp_get);
  RUN_TEST(test_date_timestamp_set);
  RUN_TEST(test_date_timezone_get);
  RUN_TEST(test_date_timezone_set);
  RUN_TEST(test_date);
  RUN_TEST(test_getdate);
  RUN_TEST(test_gettimeofday);
  RUN_TEST(test_gmdate);
  RUN_TEST(test_gmmktime);
  RUN_TEST(test_gmstrftime);
  RUN_TEST(test_idate);
  RUN_TEST(test_localtime);
  RUN_TEST(test_microtime);
  RUN_TEST(test_mktime);
  RUN_TEST(test_strftime);
  RUN_TEST(test_strptime);
  RUN_TEST(test_strtotime);
  RUN_TEST(test_time);
  RUN_TEST(test_timezone_abbreviations_list);
  RUN_TEST(test_timezone_identifiers_list);
  RUN_TEST(test_timezone_location_get);
  RUN_TEST(test_timezone_name_from_abbr);
  RUN_TEST(test_timezone_name_get);
  RUN_TEST(test_timezone_offset_get);
  RUN_TEST(test_timezone_open);
  RUN_TEST(test_timezone_transitions_get);
  RUN_TEST(test_timezone_version_get);

  return ret;
}
예제 #14
0
bool TestExtCurl::RunTests(const std::string &which) {
  bool ret = true;

  DECLARE_TEST_FUNCTIONS("function curl_write_func($s1, $s2) {"
                         " print 'curl_write_func called with ';"
                         " print $s2;"
                         " return strlen($s2);"
                         "}");

  ServerPtr server = runServer();

  RUN_TEST(test_curl_init);
  RUN_TEST(test_curl_copy_handle);
  RUN_TEST(test_curl_version);
  RUN_TEST(test_curl_setopt);
  RUN_TEST(test_curl_setopt_array);
  RUN_TEST(test_curl_exec);
  RUN_TEST(test_curl_getinfo);
  RUN_TEST(test_curl_errno);
  RUN_TEST(test_curl_error);
  RUN_TEST(test_curl_close);
  RUN_TEST(test_curl_multi_init);
  RUN_TEST(test_curl_multi_add_handle);
  RUN_TEST(test_curl_multi_remove_handle);
  RUN_TEST(test_curl_multi_exec);
  RUN_TEST(test_curl_multi_select);
  RUN_TEST(test_curl_multi_getcontent);
  RUN_TEST(test_curl_multi_info_read);
  RUN_TEST(test_curl_multi_close);
  RUN_TEST(test_evhttp_set_cache);
  RUN_TEST(test_evhttp_get);
  RUN_TEST(test_evhttp_post);
  RUN_TEST(test_evhttp_post_gzip);
  RUN_TEST(test_evhttp_async_get);
  RUN_TEST(test_evhttp_async_post);
  RUN_TEST(test_evhttp_recv);

  server->stop();

  return ret;
}
//=======MAIN=====
int main(void)
{
  UnityBegin("test_LEDPart3.c");
  RUN_TEST(test_initial_will_goes_to_CheckButton_when_executed, 19);
  RUN_TEST(test_CheckButton_will_stay_at_current_state_when_button_is_not_read, 32);
  RUN_TEST(test_CheckButton_will_transition_to_ON_when_button_is_read, 47);
  RUN_TEST(test_On_will_turnOnLED_and_stay_when_timer_not_reach_yet, 64);
  RUN_TEST(test_On_goes_to_turnOffLED_when_timer_reached, 88);
  RUN_TEST(test_Off_will_turnOffLED_and_stay_when_timer_not_reach_yet, 109);
  RUN_TEST(test_Off_will_goes_to_CheckCount_when_timer_reached, 134);
  RUN_TEST(test_CheckCount_will_go_to_ON_when_count_is_smaller_than_5, 157);
  RUN_TEST(test_CheckCount_will_goes_to_isButtonHold_when_count_is_equal_to_5, 175);
  RUN_TEST(test_isButtonHold_will_stay_at_currentState_when_button_is_still_press, 191);
  RUN_TEST(test_isButtonHold_will_goes_to_CheckButton_when_button_is_not_press, 209);
  RUN_TEST(test_allInOneTest, 228);

  CMock_Guts_MemFreeFinal();
  return (UnityEnd());
}
예제 #16
0
//=======MAIN=====
int main(int argc, char *argv[])
{
  progname = argv[0];
  UnityBegin("t-ntp_scanner.c");
  RUN_TEST(test_keywordIncorrectToken, 21);
  RUN_TEST(test_keywordServerToken, 22);
  RUN_TEST(test_DropUninitializedStack, 23);
  RUN_TEST(test_IncorrectlyInitializeLexStack, 24);
  RUN_TEST(test_InitializeLexStack, 25);
  RUN_TEST(test_PopEmptyStack, 61);
  RUN_TEST(test_IsInteger, 69);
  RUN_TEST(test_IsUint, 87);
  RUN_TEST(test_IsDouble, 99);
  RUN_TEST(test_SpecialSymbols, 111);
  RUN_TEST(test_EOC, 120);

  return (UnityEnd());
}
예제 #17
0
bool TestExtMb::RunTests(const std::string &which) {
  bool ret = true;
  f_mb_internal_encoding("UTF-8");

  RUN_TEST(test_mb_list_encodings);
  RUN_TEST(test_mb_list_encodings_alias_names);
  RUN_TEST(test_mb_list_mime_names);
  RUN_TEST(test_mb_check_encoding);
  RUN_TEST(test_mb_convert_case);
  RUN_TEST(test_mb_convert_encoding);
  RUN_TEST(test_mb_convert_kana);
  RUN_TEST(test_mb_convert_variables);
  RUN_TEST(test_mb_decode_mimeheader);
  RUN_TEST(test_mb_decode_numericentity);
  RUN_TEST(test_mb_detect_encoding);
  RUN_TEST(test_mb_detect_order);
  RUN_TEST(test_mb_encode_mimeheader);
  RUN_TEST(test_mb_encode_numericentity);
  RUN_TEST(test_mb_ereg_match);
  RUN_TEST(test_mb_ereg_replace);
  RUN_TEST(test_mb_ereg_search_getpos);
  RUN_TEST(test_mb_ereg_search_getregs);
  RUN_TEST(test_mb_ereg_search_init);
  RUN_TEST(test_mb_ereg_search_pos);
  RUN_TEST(test_mb_ereg_search_regs);
  RUN_TEST(test_mb_ereg_search_setpos);
  RUN_TEST(test_mb_ereg_search);
  RUN_TEST(test_mb_ereg);
  RUN_TEST(test_mb_eregi_replace);
  RUN_TEST(test_mb_eregi);
  RUN_TEST(test_mb_get_info);
  RUN_TEST(test_mb_http_input);
  RUN_TEST(test_mb_http_output);
  RUN_TEST(test_mb_internal_encoding);
  RUN_TEST(test_mb_language);
  RUN_TEST(test_mb_output_handler);
  RUN_TEST(test_mb_parse_str);
  RUN_TEST(test_mb_preferred_mime_name);
  RUN_TEST(test_mb_regex_encoding);
  RUN_TEST(test_mb_regex_set_options);
  RUN_TEST(test_mb_send_mail);
  RUN_TEST(test_mb_split);
  RUN_TEST(test_mb_strcut);
  RUN_TEST(test_mb_strimwidth);
  RUN_TEST(test_mb_stripos);
  RUN_TEST(test_mb_stristr);
  RUN_TEST(test_mb_strlen);
  RUN_TEST(test_mb_strpos);
  RUN_TEST(test_mb_strrchr);
  RUN_TEST(test_mb_strrichr);
  RUN_TEST(test_mb_strripos);
  RUN_TEST(test_mb_strrpos);
  RUN_TEST(test_mb_strstr);
  RUN_TEST(test_mb_strtolower);
  RUN_TEST(test_mb_strtoupper);
  RUN_TEST(test_mb_strwidth);
  RUN_TEST(test_mb_substitute_character);
  RUN_TEST(test_mb_substr_count);
  RUN_TEST(test_mb_substr);

  return ret;
}
예제 #18
0
bool TestExtSession::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_session_set_cookie_params);
  RUN_TEST(test_session_get_cookie_params);
  RUN_TEST(test_session_name);
  RUN_TEST(test_session_module_name);
  RUN_TEST(test_session_set_save_handler);
  RUN_TEST(test_session_save_path);
  RUN_TEST(test_session_id);
  RUN_TEST(test_session_regenerate_id);
  RUN_TEST(test_session_cache_limiter);
  RUN_TEST(test_session_cache_expire);
  RUN_TEST(test_session_encode);
  RUN_TEST(test_session_decode);
  RUN_TEST(test_session_start);
  RUN_TEST(test_session_destroy);
  RUN_TEST(test_session_unset);
  RUN_TEST(test_session_commit);
  RUN_TEST(test_session_write_close);
  RUN_TEST(test_session_register);
  RUN_TEST(test_session_unregister);
  RUN_TEST(test_session_is_registered);

  return ret;
}
예제 #19
0
static const char *test_general(void) {
  uint8_t seg_size;
  uint8_t stash_size;

  /* Try various stash sizes... */
  for (stash_size = 0; stash_size <= 3; stash_size++) {
    /* And various seg sizes */
    for (seg_size = 1; seg_size <= 16; seg_size <<= 1) {
      struct segstack ss;
      struct segstack_opt opt = {
          .cell_size = 4, .seg_size = seg_size, .stash_segs = stash_size,
      };
      const int maxsize = 500;
      const int maxback = 50;
      const int dropsize = 123;
      int max_segs_num = 0;
      segstack_init(&ss, &opt);

      /* Fill the stack with values */
      int32_t i;
      for (i = 0; i <= maxsize; i++) {
        int32_t val = f(i);
        segstack_push(&ss, &val);
        ASSERT_EQ(num_segs(&ss), (i / seg_size + 1));
      }

      max_segs_num = num_segs(&ss);

      ASSERT(segstack_at(&ss, maxsize + 1) == NULL);
      ASSERT(segstack_at(&ss, -maxsize - 2) == NULL);

      /* Check each element of the stack */
      for (i = 0; i <= maxsize; i++) {
        ASSERT_EQ(*(int32_t *) segstack_at(&ss, i), f(i));
        ASSERT_EQ(num_segs(&ss), (maxsize / seg_size + 1));
      }

      /* Pop various amounts of cells from the stack, and push them back */
      int back;
      for (back = 1; back < maxback; back++) {
        for (i = maxsize; i >= (maxsize - back); i--) {
          const char *t = test_pop(&ss, i, seg_size, max_segs_num, stash_size);
          if (t != NULL) {
            return t;
          }
          int32_t val = 0xa5a5a5a5;
          segstack_push(&ss, &val);
          segstack_pop(&ss, NULL);
        }

        for (i = (maxsize - back); i <= maxsize; i++) {
          int32_t val = f(i);
          segstack_push(&ss, &val);
        }
      }

      /* Drop stack size by dropsize */
      segstack_set_size(&ss, maxsize - dropsize + 1);

      /* Pop all elements from the stack */
      for (i = maxsize - dropsize; i >= 0; i--) {
        const char *t = test_pop(&ss, i, seg_size, max_segs_num, stash_size);
        if (t != NULL) {
          return t;
        }
      }

      /* There should be no TOS, and len is 0 */
      ASSERT_EQ(segstack_size(&ss), 0);
      ASSERT(ss.tos_seg == NULL);

      /* In case of no stash, last_seg should also be NULL */
      if (stash_size == 0) {
        ASSERT(ss.last_seg == NULL);
      }

      segstack_free(&ss);
    }
  }
  return NULL;
}

static const char *run_all_tests(void) {
  RUN_TEST(test_general);
  return NULL;
}
예제 #20
0
파일: vclz.c 프로젝트: 0day-ci/gcc
int
test_vclz_u32 ()
{
  int i;
  uint32x2_t a;
  uint32x2_t b;

  uint32_t test_set0[2] = { TEST0, TEST1 };
  uint32_t test_set1[2] = { TEST2, TEST3 };
  uint32_t test_set2[2] = { TEST4, TEST5 };
  uint32_t test_set3[2] = { TEST6, TEST7 };
  uint32_t test_set4[2] = { TEST8, TEST9 };
  uint32_t test_set5[2] = { TEST10, TEST11 };
  uint32_t test_set6[2] = { TEST12, TEST13 };
  uint32_t test_set7[2] = { TEST14, TEST15 };
  uint32_t test_set8[2] = { TEST16, TEST17 };
  uint32_t test_set9[2] = { TEST18, TEST19 };
  uint32_t test_set10[2] = { TEST20, TEST21 };
  uint32_t test_set11[2] = { TEST22, TEST23 };
  uint32_t test_set12[2] = { TEST24, TEST25 };
  uint32_t test_set13[2] = { TEST26, TEST27 };
  uint32_t test_set14[2] = { TEST28, TEST29 };
  uint32_t test_set15[2] = { TEST30, TEST31 };
  uint32_t test_set16[2] = { TEST32, TEST32 };

  uint32_t answ_set0[2] = { 32, 31 };
  uint32_t answ_set1[2] = { 30, 29 };
  uint32_t answ_set2[2] = { 28, 27 };
  uint32_t answ_set3[2] = { 26, 25 };
  uint32_t answ_set4[2] = { 24, 23 };
  uint32_t answ_set5[2] = { 22, 21 };
  uint32_t answ_set6[2] = { 20, 19 };
  uint32_t answ_set7[2] = { 18, 17 };
  uint32_t answ_set8[2] = { 16, 15 };
  uint32_t answ_set9[2] = { 14, 13 };
  uint32_t answ_set10[2] = { 12, 11 };
  uint32_t answ_set11[2] = { 10, 9 };
  uint32_t answ_set12[2] = { 8, 7 };
  uint32_t answ_set13[2] = { 6, 5 };
  uint32_t answ_set14[2] = { 4, 3 };
  uint32_t answ_set15[2] = { 2, 1 };
  uint32_t answ_set16[2] = { 0, 0 };

  RUN_TEST (test_set0, answ_set0, 64, 32, 0, 2);
  RUN_TEST (test_set1, answ_set1, 64, 32, 0, 2);
  RUN_TEST (test_set2, answ_set2, 64, 32, 0, 2);
  RUN_TEST (test_set3, answ_set3, 64, 32, 0, 2);
  RUN_TEST (test_set4, answ_set4, 64, 32, 0, 2);
  RUN_TEST (test_set5, answ_set5, 64, 32, 0, 2);
  RUN_TEST (test_set6, answ_set6, 64, 32, 0, 2);
  RUN_TEST (test_set7, answ_set7, 64, 32, 0, 2);
  RUN_TEST (test_set8, answ_set8, 64, 32, 0, 2);
  RUN_TEST (test_set9, answ_set9, 64, 32, 0, 2);
  RUN_TEST (test_set10, answ_set10, 64, 32, 0, 2);
  RUN_TEST (test_set11, answ_set11, 64, 32, 0, 2);
  RUN_TEST (test_set12, answ_set12, 64, 32, 0, 2);
  RUN_TEST (test_set13, answ_set13, 64, 32, 0, 2);
  RUN_TEST (test_set14, answ_set14, 64, 32, 0, 2);
  RUN_TEST (test_set15, answ_set15, 64, 32, 0, 2);
  RUN_TEST (test_set16, answ_set16, 64, 32, 0, 1);

  return 0;
}
//=======MAIN=====
int main(void)
{
  Unity.TestFile = "test_OperatorEvaluate.c";
  UnityBegin();
  RUN_TEST(test_operatorEvaluate_should_throw_error_when_encounter_invalid_operator, 32);
  RUN_TEST(test_operatorEvaluate_3_PLUS_7, 57);
  RUN_TEST(test_operatorEvaluate_100_MINUS_37, 80);
  RUN_TEST(test_operatorEvaluate_100_MULTIPLY_50, 103);
  RUN_TEST(test_operatorEvaluate_99_DIVIDE_3, 125);
  RUN_TEST(test_operatorEvaluate_60_MODULUS_7, 147);
  RUN_TEST(test_operatorEvaluate_45_BITWISEAND_54, 169);
  RUN_TEST(test_operatorEvaluate_56_BITWISEOR_30, 191);
  RUN_TEST(test_operatorEvaluate_56_BITWISEXOR_30, 213);
  RUN_TEST(test_evaluateAllOperatorOnStack_2_plus_3_plus_4, 251);
  RUN_TEST(test_evaluateAllOperatorOnStack_10_plus_3_multiply_9, 299);
  RUN_TEST(test_evaluateAllOperatorOnStack_100_divide_5_plus_60, 347);
  RUN_TEST(test_evaluateAllOperatorOnStack_99_XOR_66_divide_11_plus_10, 395);
  RUN_TEST(test_evaluateAllOperatorOnStack_100_divide_5_multiply_6_plus_99_minus_20, 460);
  RUN_TEST(test_evaluateAllOperatorOnStack_100_divide_5_multiply_6_plus_99_minus_20_modulus_30, 541);
  RUN_TEST(test_evaluateAllOperatorOnStack_100_divide_5_multiply_6_plus_99_minus_20_modulus_30_bitwiseAnd_89, 638);

  return (UnityEnd());
}
bool TestExtOpenssl::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_openssl_csr_export_to_file);
  RUN_TEST(test_openssl_csr_export);
  RUN_TEST(test_openssl_csr_get_public_key);
  RUN_TEST(test_openssl_csr_get_subject);
  RUN_TEST(test_openssl_csr_new);
  RUN_TEST(test_openssl_csr_sign);
  RUN_TEST(test_openssl_error_string);
  RUN_TEST(test_openssl_free_key);
  RUN_TEST(test_openssl_open);
  RUN_TEST(test_openssl_pkcs12_export_to_file);
  RUN_TEST(test_openssl_pkcs12_export);
  RUN_TEST(test_openssl_pkcs12_read);
  RUN_TEST(test_openssl_pkcs7_decrypt);
  //RUN_TEST(test_openssl_pkcs7_encrypt);
  RUN_TEST(test_openssl_pkcs7_sign);
  RUN_TEST(test_openssl_pkcs7_verify);
  RUN_TEST(test_openssl_pkey_export_to_file);
  RUN_TEST(test_openssl_pkey_export);
  RUN_TEST(test_openssl_pkey_free);
  RUN_TEST(test_openssl_pkey_get_details);
  RUN_TEST(test_openssl_pkey_get_private);
  RUN_TEST(test_openssl_get_privatekey);
  RUN_TEST(test_openssl_pkey_get_public);
  RUN_TEST(test_openssl_get_publickey);
  RUN_TEST(test_openssl_pkey_new);
  RUN_TEST(test_openssl_private_decrypt);
  RUN_TEST(test_openssl_private_encrypt);
  RUN_TEST(test_openssl_public_decrypt);
  RUN_TEST(test_openssl_public_encrypt);
  RUN_TEST(test_openssl_seal);
  RUN_TEST(test_openssl_sign);
  RUN_TEST(test_openssl_verify);
  RUN_TEST(test_openssl_x509_check_private_key);
  RUN_TEST(test_openssl_x509_checkpurpose);
  RUN_TEST(test_openssl_x509_export_to_file);
  RUN_TEST(test_openssl_x509_export);
  RUN_TEST(test_openssl_x509_free);
  RUN_TEST(test_openssl_x509_parse);
  RUN_TEST(test_openssl_x509_read);
  RUN_TEST(test_openssl_encrypt);
  RUN_TEST(test_openssl_digest);
  return ret;
}
예제 #23
0
파일: lexer_test.c 프로젝트: maitesin/acc
int main(void)
{
    UNITY_BEGIN();
    RUN_TEST(simple_file_only_main);
    RUN_TEST(push_token_to_stack);
    RUN_TEST(push_two_tokens_to_stack);
    RUN_TEST(push_token_and_call_next);
    RUN_TEST(if_without_else);
    RUN_TEST(if_with_else);
    RUN_TEST(read_token_int_type);
    RUN_TEST(read_token_int_value);
    RUN_TEST(read_token_function);
    RUN_TEST(read_token_opar);
    RUN_TEST(read_token_cpar);
    RUN_TEST(read_token_obra);
    RUN_TEST(read_token_cbra);
    RUN_TEST(read_token_return);
    RUN_TEST(read_token_semicolon);
    RUN_TEST(read_token_eof);
    RUN_TEST(read_token_if);
    RUN_TEST(read_token_else);
    RUN_TEST(read_token_equalequal);
    RUN_TEST(read_token_notequal);
    RUN_TEST(read_token_lessequalthan);
    RUN_TEST(read_token_greaterequalthan);
    RUN_TEST(read_token_oror);
    RUN_TEST(read_token_andand);
    RUN_TEST(read_token_lessthan);
    RUN_TEST(read_token_greaterthan);
    RUN_TEST(read_token_not);
    return UNITY_END();
}
예제 #24
0
파일: test10.c 프로젝트: FoXPeeD/OS-bwis
int main() {
	RUN_TEST(shortFork);
	return 0;
}
예제 #25
0
bool TestExtFb::RunTests(const std::string &which) {
  bool ret = true;

  RUN_TEST(test_fb_compact_serialize);
  RUN_TEST(test_fb_compact_unserialize);
  RUN_TEST(test_fb_thrift_serialize);
  RUN_TEST(test_fb_thrift_unserialize);
  RUN_TEST(test_fb_rename_function);
  RUN_TEST(test_fb_utf8ize);
  RUN_TEST(test_fb_utf8_strlen);
  RUN_TEST(test_fb_utf8_strlen_deprecated);
  RUN_TEST(test_fb_utf8_substr);
  RUN_TEST(test_fb_call_user_func_safe);
  RUN_TEST(test_fb_call_user_func_safe_return);
  RUN_TEST(test_fb_call_user_func_array_safe);
  RUN_TEST(test_fb_load_local_databases);
  RUN_TEST(test_fb_parallel_query);
  RUN_TEST(test_fb_crossall_query);

  return ret;
}
예제 #26
0
int
main(int argc, char **argv)
{

#ifdef TEST_ALL
  RUN_TEST(1,1);
  RUN_TEST(1,2);
  RUN_TEST(1,4);
  RUN_TEST(1,8);
  RUN_TEST(1,16);
  RUN_TEST(2,1);
  RUN_TEST(2,2);
  RUN_TEST(2,4);
  RUN_TEST(2,8);
  RUN_TEST(2,16);
  RUN_TEST(3,1);
  RUN_TEST(3,2);
  RUN_TEST(3,4);
  RUN_TEST(3,8);
  RUN_TEST(3,16);
  RUN_TEST(4,1);
  RUN_TEST(4,2);
  RUN_TEST(4,4);
  RUN_TEST(4,8);
  RUN_TEST(4,16);
  RUN_TEST(5,1);
  RUN_TEST(5,2);
  RUN_TEST(5,4);
  RUN_TEST(5,8);
  RUN_TEST(5,16);
  RUN_TEST(6,1);
  RUN_TEST(6,2);
  RUN_TEST(6,4);
  RUN_TEST(6,8);
  RUN_TEST(6,16);
  RUN_TEST(7,1);
  RUN_TEST(7,2);
  RUN_TEST(7,4);
  RUN_TEST(7,8);
  RUN_TEST(7,16);
  RUN_TEST(8,1);
  RUN_TEST(8,2);
  RUN_TEST(8,4);
  RUN_TEST(8,8);
  RUN_TEST(8,16);
  RUN_TEST(9,1);
  RUN_TEST(9,2);
  RUN_TEST(9,4);
  RUN_TEST(9,8);
  RUN_TEST(9,16);
  RUN_TEST(10,1);
  RUN_TEST(10,2);
  RUN_TEST(10,4);
  RUN_TEST(10,8);
  RUN_TEST(10,16);
  RUN_TEST(11,1);
  RUN_TEST(11,2);
  RUN_TEST(11,4);
  RUN_TEST(11,8);
  RUN_TEST(11,16);
  RUN_TEST(12,1);
  RUN_TEST(12,2);
  RUN_TEST(12,4);
  RUN_TEST(12,8);
  RUN_TEST(12,16);
  RUN_TEST(13,1);
  RUN_TEST(13,2);
  RUN_TEST(13,4);
  RUN_TEST(13,8);
  RUN_TEST(13,16);
  RUN_TEST(14,1);
  RUN_TEST(14,2);
  RUN_TEST(14,4);
  RUN_TEST(14,8);
  RUN_TEST(14,16);
  RUN_TEST(15,1);
  RUN_TEST(15,2);
  RUN_TEST(15,4);
  RUN_TEST(15,8);
  RUN_TEST(15,16);
  RUN_TEST(16,1);
  RUN_TEST(16,2);
  RUN_TEST(16,4);
  RUN_TEST(16,8);
  RUN_TEST(16,16);
  RUN_TEST(17,1);
  RUN_TEST(17,2);
  RUN_TEST(17,4);
  RUN_TEST(17,8);
  RUN_TEST(17,16);
  RUN_TEST(18,1);
  RUN_TEST(18,2);
  RUN_TEST(18,4);
  RUN_TEST(18,8);
  RUN_TEST(18,16);
  RUN_TEST(19,1);
  RUN_TEST(19,2);
  RUN_TEST(19,4);
  RUN_TEST(19,8);
  RUN_TEST(19,16);
  RUN_TEST(20,1);
  RUN_TEST(20,2);
  RUN_TEST(20,4);
  RUN_TEST(20,8);
  RUN_TEST(20,16);
  RUN_TEST(21,1);
  RUN_TEST(21,2);
  RUN_TEST(21,4);
  RUN_TEST(21,8);
  RUN_TEST(21,16);
  RUN_TEST(22,1);
  RUN_TEST(22,2);
  RUN_TEST(22,4);
  RUN_TEST(22,8);
  RUN_TEST(22,16);
  RUN_TEST(23,1);
  RUN_TEST(23,2);
  RUN_TEST(23,4);
  RUN_TEST(23,8);
  RUN_TEST(23,16);
  RUN_TEST(24,1);
  RUN_TEST(24,2);
  RUN_TEST(24,4);
  RUN_TEST(24,8);
  RUN_TEST(24,16);
  RUN_TEST(25,1);
  RUN_TEST(25,2);
  RUN_TEST(25,4);
  RUN_TEST(25,8);
  RUN_TEST(25,16);
  RUN_TEST(26,1);
  RUN_TEST(26,2);
  RUN_TEST(26,4);
  RUN_TEST(26,8);
  RUN_TEST(26,16);
  RUN_TEST(27,1);
  RUN_TEST(27,2);
  RUN_TEST(27,4);
  RUN_TEST(27,8);
  RUN_TEST(27,16);
  RUN_TEST(28,1);
  RUN_TEST(28,2);
  RUN_TEST(28,4);
  RUN_TEST(28,8);
  RUN_TEST(28,16);
  RUN_TEST(29,1);
  RUN_TEST(29,2);
  RUN_TEST(29,4);
  RUN_TEST(29,8);
  RUN_TEST(29,16);
  RUN_TEST(30,1);
  RUN_TEST(30,2);
  RUN_TEST(30,4);
  RUN_TEST(30,8);
  RUN_TEST(30,16);
  RUN_TEST(31,1);
  RUN_TEST(31,2);
  RUN_TEST(31,4);
  RUN_TEST(31,8);
  RUN_TEST(31,16);
  RUN_TEST(32,1);
  RUN_TEST(32,2);
  RUN_TEST(32,4);
  RUN_TEST(32,8);
  RUN_TEST(32,16);
  RUN_TEST(33,1);
  RUN_TEST(33,2);
  RUN_TEST(33,4);
  RUN_TEST(33,8);
  RUN_TEST(33,16);
  RUN_TEST(34,1);
  RUN_TEST(34,2);
  RUN_TEST(34,4);
  RUN_TEST(34,8);
  RUN_TEST(34,16);
  RUN_TEST(35,1);
  RUN_TEST(35,2);
  RUN_TEST(35,4);
  RUN_TEST(35,8);
  RUN_TEST(35,16);
  RUN_TEST(36,1);
  RUN_TEST(36,2);
  RUN_TEST(36,4);
  RUN_TEST(36,8);
  RUN_TEST(36,16);
  RUN_TEST(37,1);
  RUN_TEST(37,2);
  RUN_TEST(37,4);
  RUN_TEST(37,8);
  RUN_TEST(37,16);
  RUN_TEST(38,1);
  RUN_TEST(38,2);
  RUN_TEST(38,4);
  RUN_TEST(38,8);
  RUN_TEST(38,16);
  RUN_TEST(39,1);
  RUN_TEST(39,2);
  RUN_TEST(39,4);
  RUN_TEST(39,8);
  RUN_TEST(39,16);
  RUN_TEST(40,1);
  RUN_TEST(40,2);
  RUN_TEST(40,4);
  RUN_TEST(40,8);
  RUN_TEST(40,16);
  RUN_TEST(41,1);
  RUN_TEST(41,2);
  RUN_TEST(41,4);
  RUN_TEST(41,8);
  RUN_TEST(41,16);
  RUN_TEST(42,1);
  RUN_TEST(42,2);
  RUN_TEST(42,4);
  RUN_TEST(42,8);
  RUN_TEST(42,16);
  RUN_TEST(43,1);
  RUN_TEST(43,2);
  RUN_TEST(43,4);
  RUN_TEST(43,8);
  RUN_TEST(43,16);
  RUN_TEST(44,1);
  RUN_TEST(44,2);
  RUN_TEST(44,4);
  RUN_TEST(44,8);
  RUN_TEST(44,16);
  RUN_TEST(45,1);
  RUN_TEST(45,2);
  RUN_TEST(45,4);
  RUN_TEST(45,8);
  RUN_TEST(45,16);
  RUN_TEST(46,1);
  RUN_TEST(46,2);
  RUN_TEST(46,4);
  RUN_TEST(46,8);
  RUN_TEST(46,16);
  RUN_TEST(47,1);
  RUN_TEST(47,2);
  RUN_TEST(47,4);
  RUN_TEST(47,8);
  RUN_TEST(47,16);
  RUN_TEST(48,1);
  RUN_TEST(48,2);
  RUN_TEST(48,4);
  RUN_TEST(48,8);
  RUN_TEST(48,16);
  RUN_TEST(49,1);
  RUN_TEST(49,2);
  RUN_TEST(49,4);
  RUN_TEST(49,8);
  RUN_TEST(49,16);
#else
  RUN_TEST(3,1);
  RUN_TEST(4,1);
  RUN_TEST(4,2);
  RUN_TEST(4,4);
  RUN_TEST(5,1);
  RUN_TEST(6,1);
  RUN_TEST(7,1);
  RUN_TEST(8,1);
  RUN_TEST(8,2);
  RUN_TEST(8,4);
  RUN_TEST(8,8);
  RUN_TEST(9,1);
  RUN_TEST(16,1);
  RUN_TEST(16,2);
  RUN_TEST(16,4);
  RUN_TEST(16,8);
  RUN_TEST(16,16);
  RUN_TEST(32,1);
  RUN_TEST(32,2);
  RUN_TEST(32,4);
  RUN_TEST(32,8);
  RUN_TEST(32,16);
#endif
  return 0;
}
예제 #27
0
void		tests_lists_maps(void)
{
	RUN_TEST(test_map_put_lists_maps, 3);
	RUN_TEST(test_map_lists_maps_to_json, 11);
}
예제 #28
0
int main(void)
{
   UnityBegin("test/test_say.c");

   RUN_TEST(test_zero);
   RUN_TEST(test_one);
   RUN_TEST(test_fourteen);
   RUN_TEST(test_twenty);
   RUN_TEST(test_twenty_two);
   RUN_TEST(test_one_hundred);
   RUN_TEST(test_one_hundred_twenty_three);
   RUN_TEST(test_one_thousand);
   RUN_TEST(test_one_thousand_two_hundred_thirty_four);
   RUN_TEST(test_one_million);
   RUN_TEST(test_one_million_two_thousand_three_hundred_forty_five);
   RUN_TEST(test_one_billion);
   RUN_TEST(test_a_big_number);
   RUN_TEST(test_numbers_below_zero_are_out_of_range);
   RUN_TEST(test_numbers_above_999_999_999_999_are_out_of_range);

   return UnityEnd();
}
//=======MAIN=====
int main(void)
{
  Unity.TestFile = "test_Rotation.c";
  UnityBegin();
  RUN_TEST(test_rightRotation_3_elements, 40);
  RUN_TEST(test_rightRotation_4_elements, 68);
  RUN_TEST(test_rightRotation_5_elements, 99);
  RUN_TEST(test_leftRotation_3_elements, 137);
  RUN_TEST(test_leftRotation_4_elements, 164);
  RUN_TEST(test_leftRotation_5_elements, 194);
  RUN_TEST(test_leftRightRotate_with_3_elements, 228);
  RUN_TEST(test_leftRightRotate_with_4_elements, 254);
  RUN_TEST(test_leftRightRotate_with_6_elements, 286);
  RUN_TEST(test_leftRightRotate_with_6_elements_case2, 322);
  RUN_TEST(test_rightLeftRotate_with_3_elements, 359);
  RUN_TEST(test_rightLeftRotate_with_4_elements, 385);
  RUN_TEST(test_color_fliping, 405);
  RUN_TEST(test_changeRootByVal, 428);
  RUN_TEST(test_changeRootByRef, 438);

  return (UnityEnd());
}
예제 #30
0
/** \brief Main entry point to run the TLS tests
 *  \param[in] pCfg The ATCAIfaceCfg configuration that defines the HAL layer interface
 *  \return void
 */
void atcatls_test_runner(ATCAIfaceCfg* pCfg)
{
	UnityBegin("atcatls_tests.c");

	g_pCfg = pCfg;

	// Call get SN first
	RUN_TEST(test_atcatls_get_sn);

	// Configure the device
	RUN_TEST(test_atcatls_config_default);

	// Call random after configuration
	RUN_TEST(test_atcatls_random);

	// TLS API Init/finish
	RUN_TEST(test_atcatls_init_finish);
	RUN_TEST(test_atcatls_init_enc_key);

	// Core TLS definitions
	RUN_TEST(test_atcatls_create_key);
	RUN_TEST(test_atcatls_sign);
	RUN_TEST(test_atcatls_verify);
	RUN_TEST(test_atcatls_ecdh);
	RUN_TEST(test_atcatls_ecdhe);
	RUN_TEST(test_atcatls_calc_pubkey);
	RUN_TEST(test_atcatls_read_pubkey);

	RUN_TEST(test_atcatls_verify_cert_chain);
	RUN_TEST(test_atcatls_ca_pubkey_write_read);
	RUN_TEST(test_atcatls_create_csr);

	RUN_TEST(test_atcatls_enc_write_read);
	RUN_TEST(test_atcatls_enc_rsakey_write_read);

	UnityEnd();
}