コード例 #1
0
ファイル: testrunner.c プロジェクト: protomouse/metagame
Suite* all_tests(void) {
  Suite* s = suite_create("all_tests");
  suite_add_tcase(s, test_util());
  suite_add_tcase(s, test_types());
  suite_add_tcase(s, test_metagame());

  return s;
}
コード例 #2
0
ファイル: type.c プロジェクト: abw/hemp
int main(
    int argc, char **argv, char **env
) {
    plan(14);
    test_types();
    test_type_registration();
    return done();
}
コード例 #3
0
ファイル: test_print.cpp プロジェクト: vinodpagadala/banjo
int
main(int argc, char* argv[])
{
  Context cxt;

  test_names(cxt);
  test_types();
  test_expressions(cxt);
}
コード例 #4
0
ファイル: test.c プロジェクト: lomik/protobuf-c-iter-unpack
int main() {
  test_types();
  test_openx();
  test_validation();
  test_skip_truncated_varint();
  test_unpack_empty_message();

  return 1;
}
コード例 #5
0
ファイル: test.c プロジェクト: BackupTheBerlios/ppasm
/***************************************************\
*                                                   *
*   Main tester entry.                              *
*                                                   *
\***************************************************/
int main(int argc, char* argv[])
{
    test_types();
    test_endian();
    test_read_line();
    test_read_first_next();
    test_strrm();
    test_conatiners();
    test_expressions();
    test_time();
    test_loader();
    return 0;
}
コード例 #6
0
ファイル: Test.cpp プロジェクト: antigol/LeekScript
int Test::all() {

	clock_t begin = clock();
	exeTime = 0;

	test_general();
	test_types();
	test_booleans();
	test_numbers();
	test_strings();
	test_arrays();
	test_intervals();
	test_map();
	test_set();
	test_objects();
	test_functions();
	test_classes();
	test_loops();
	test_operators();
	test_references();
	test_exceptions();
	test_operations();
	test_system();
	test_json();
	test_files();
	test_doc();
	test_utils();

	double elapsed_secs = double(clock() - begin) / CLOCKS_PER_SEC;
	int errors = (total - success_count);
	int leaks = (obj_created - obj_deleted);
	int mpz_leaks = (mpz_obj_created - mpz_obj_deleted);

	std::ostringstream line1, line2, line3, line4;
	line1 << "Total : " << total << ", success : " << success_count << ", errors : " << errors;
	line2 << "Total time : " << elapsed_secs * 1000 << " ms";
	line3 << "Objects destroyed : " << obj_deleted << " / " << obj_created << " (" << leaks << " leaked)";
	line4 << "MPZ objects destroyed : " << mpz_obj_deleted << " / " << mpz_obj_created << " (" << mpz_leaks << " leaked)";
	unsigned w = std::max(line1.str().size(), std::max(line2.str().size(), std::max(line3.str().size(), line4.str().size())));

	auto pad = [](std::string s, int l) {
		l -= s.size();
		while (l-- > 0) s += " ";
		return s;
	};
	std::cout << "┌";
	for (unsigned i = 0; i < w + 2; ++i) std::cout << "─";
	std::cout << "┐" << std::endl;
	std::cout << "│ " << pad(line1.str(), w) << " │" << std::endl;
	std::cout << "│ " << pad(line2.str(), w) << " │" << std::endl;
	std::cout << "│ " << pad(line3.str(), w) << " │" << std::endl;
	std::cout << "│ " << pad(line4.str(), w) << " │" << std::endl;
	std::cout << "├";
	for (unsigned i = 0; i < w + 2; ++i) std::cout << "─";
	std::cout << "┤";
	std::cout << std::endl;

	int result = abs(errors) + abs(leaks) + abs(mpz_leaks);
	if (result == 0) {
		std::cout << "│ " << pad("GOOD! ✔", w + 2) << " │" << std::endl;
	} else {
		std::cout << "│ " << pad("BAD! : " + std::to_string(result) + " error(s) ✘", w + 2) << " │" << std::endl;
	}
	std::cout << "└";
	for (unsigned i = 0; i < w + 2; ++i) std::cout << "─";
	std::cout << "┘" << std::endl;

	for (const auto& error : failed_tests) {
		std::cout << " " << error << std::endl;
	}
	if (failed_tests.size()) {
		std::cout << std::endl;
	}
	return result;
}
コード例 #7
0
ファイル: user_main.c プロジェクト: magore/esp8266_ili9341
/**
 @brief main() Initialize user task
 @return void
*/
MEMSPACE 
void setup(void)
{
	int i;
    char time[20];
	int ret;
	uint16_t *ptr;
	double ang;
	extern web_init();
	int w,h;

	ip_msg[0] = 0;

// CPU
// 160MHZ
   REG_SET_BIT(0x3ff00014, BIT(0));
// 80MHZ
//   REG_CLR_BIT(0x3ff00014, BIT(0));

	os_delay_us(200000L);	// Power Up dalay - lets power supplies and devices settle

	// Configure the UART
	//uart_init(BIT_RATE_115200,BIT_RATE_115200);
	uart_init(BIT_RATE_74880,BIT_RATE_74880);

	os_delay_us(200000L);	// Power Up dalay - lets power supplies and devices settle
	os_delay_us(200000L);	// Power Up dalay - lets power supplies and devices settle
	printf("\n\n\n\n");
    sep();
	printf("System init...\n");
    printf("ESP8266 multidevice project\n");
    printf(" (c) 2014-2017 by Mike Gore\n");
    printf(" GNU version 3\n");
    printf("-> https://github.com/magore/esp8266_ili9341\n");
    printf("   GIT last pushed:   %s\n", GIT_VERSION);
    printf("   Last updated file: %s\n", LOCAL_MOD);


    sep();
    PrintRam();

    sep();
	printf("HSPI init...\n");
	hspi_init(1,0);

	printf("Timers init...\n");
	init_timers();

	// 1000HZ timer
	ms_init();

	test_types();

	// Functions manage user defined address pins
	chip_addr_init();

	initialize_clock(300);


#ifdef ADF4351
	#ifdef ADF4351_CS
		chip_select_init(ADF4351_CS);
	#endif
	ADF4351_Init();
	printf("ADF4351 init done\n");
#endif

// Make sure all other GPIO pins are initialized BEFORE SD card
#ifdef FATFS_SUPPORT
    sep();
	// Functions manage chip selects
	#ifdef MMC_CS
		chip_select_init(MMC_CS);
	#endif
	printf("SD Card init...\n");
	mmc_init(1);
#endif

#ifdef DISPLAY
    sep();
	#ifdef ILI9341_CS
		chip_select_init(ILI9341_CS);
	#endif

	#ifdef XPT2046_CS
		XPT2046_spi_init();
	#endif

	// Initialize TFT
	master = tft_init();

 	tft_calX = MatRead("/tft_calX");
 	tft_calY = MatRead("/tft_calY");
	if(tft_calX.data == NULL || tft_calY.data == NULL)
		tft_is_calibrated = 0;
	else
		tft_is_calibrated = 1;
	printf("TFT calibration %s\n", tft_is_calibrated ?  "YES" : "NO");

	// rotateion = 1, debug = 1
	setup_windows(1,1);
#endif

	wdt_reset();
    sep();
	printf("Setup Tasks\n");

    sep();
	setup_networking();

	#ifdef TELNET_SERIAL
		printf("Setup Network Serial Bridge\n");
		bridge_task_init(23);
	#endif

	if ( espconn_tcp_set_max_con(MAX_CONNECTIONS+1) )
		printf("espconn_tcp_set_max_con(%d) != (%d) - failed!\n", 
			MAX_CONNECTIONS+1, espconn_tcp_get_max_con());
	else
		printf("espconn_tcp_set_max_con(%d) = (%d) - success!\n", 
			MAX_CONNECTIONS+1, espconn_tcp_get_max_con());

#ifdef NETWORK_TEST
	printf("Setup Network TFT Display Client\n");
	servertest_setup(TCP_PORT);
#endif

#ifdef WEBSERVER
	printf("Setup Network WEB SERVER\n");
	web_init(80);
#endif

    sep();
    PrintRam();

	system_set_os_print(0);

} //setup()
コード例 #8
0
ファイル: test_hash.cpp プロジェクト: NoraAl/banjo
int
main(int argc, char* argv[])
{
  test_types();
}