本文整理汇总了C++中CYG_TEST_NA函数的典型用法代码示例。如果您正苦于以下问题:C++ CYG_TEST_NA函数的具体用法?C++ CYG_TEST_NA怎么用?C++ CYG_TEST_NA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CYG_TEST_NA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int
main( int argc, char *argv[] )
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C "
"library atexit() function");
#if defined(CYGFUN_LIBC_ATEXIT)
// we only have one test in us! We can only exit once :-)
CYG_TEST_PASS_FAIL( atexit(&myfun3)==0,
"Simple registration of first atexit() function" );
CYG_TEST_PASS_FAIL( atexit(&myfun2)==0,
"Simple registration of second atexit() function" );
CYG_TEST_PASS_FAIL( atexit(&myfun1)==0,
"Simple registration of third atexit() function" );
return 0;
#else
CYG_TEST_NA("Testing is not applicable to this configuration");
CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C "
"library atexit() function");
#endif // if defined(CYGFUN_LIBC_ATEXIT)
} // main()
示例2: main
int main( int argc, char **argv )
{
CYG_TEST_INIT();
CYG_TEST_NA("stdio");
}
示例3: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA( "This test needs CYGVAR_KERNEL_COUNTERS_CLOCK "
"and CYGFUN_KERNEL_API_C" );
}
示例4: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA("This test needs DHCP enabled");
}
示例5: cyg_start
void
cyg_start(void)
{
CYG_TEST_INIT();
CYG_TEST_NA( NA_MSG );
CYG_TEST_FINISH("Done");
}
示例6: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_NA("FP test requires:\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
}
示例7: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_INFO("FP test requires:\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE && \n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12) &&\n"
"(CYGMEM_REGION_ram_SIZE >= (49152-4096))\n");
CYG_TEST_NA("FP test requirements");
}
示例8: tcp_server
void
tcp_server(cyg_addrword_t param)
{
init_all_network_interfaces();
diag_printf("Start TCP server - test\n");
cyg_thread_resume(client_thread_handle); // Start it
#if NLOOP > 0
server();
CYG_TEST_PASS_FINISH( "server returned OK" );
#endif
CYG_TEST_NA( "No loopback devs" );
}
示例9: main
int
main(int argc, char *argv[])
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"rand() function");
test(0);
CYG_TEST_NA("Testing is not applicable to this configuration");
} // main()
示例10: entry0
static void entry0( cyg_addrword_t data )
{
int i;
unsigned long len;
int err;
int buf_size = sizeof(gzip_test_ref)+512;
unsigned char* unpacked = malloc(buf_size);
if (NULL == unpacked)
CYG_TEST_NA("Not enough memory for buffers");
CYG_TEST_INFO("Decompressing");
len = buf_size;
err = uncompress(unpacked, &len, gzip_test, sizeof(gzip_test));
switch (err) {
case Z_OK:
break;
case Z_MEM_ERROR:
CYG_TEST_NA("Not enough memory for decompression");
break;
case Z_BUF_ERROR:
CYG_TEST_FAIL_FINISH("Decompressed data larger than original");
break;
case Z_DATA_ERROR:
CYG_TEST_FAIL_FINISH("Decompression failed");
break;
default:
CYG_TEST_FAIL_FINISH("Unknown decompression error");
break;
}
for (i = 0; i < sizeof(gzip_test_ref)-1; i++) {
if (gzip_test_ref[i] != unpacked[i])
CYG_TEST_FAIL_FINISH("Verify failed");
}
CYG_TEST_PASS_FINISH("zlib2 OK");
}
示例11: main
int
main(int argc, char *argv[])
{
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"strtok() function");
CYG_TEST_INFO("This testcase provides simple basic tests");
test(0);
CYG_TEST_NA("Testing is not applicable to this configuration");
} // main()
示例12: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
CYG_TEST_INFO("Timeslice test requires:\n"
"CYGSEM_KERNEL_SCHED_TIMESLICE &&\n"
"CYGFUN_KERNEL_API_C && \n"
"CYGSEM_KERNEL_SCHED_MLQUEUE &&\n"
"CYGVAR_KERNEL_COUNTERS_CLOCK &&\n"
"!CYGDBG_INFRA_DIAG_USE_DEVICE &&\n"
"(CYGNUM_KERNEL_SCHED_PRIORITIES > 12)\n");
CYG_TEST_NA("Timeslice test requirements");
}
示例13: cyg_start
externC void
cyg_start( void )
{
CYG_TEST_INIT();
// Attaching the ISR will not succeed if the kernel real-time
// clock has been configured in.
#ifndef CYGVAR_KERNEL_COUNTERS_CLOCK
intr_main();
#else
CYG_TEST_NA("Cannot override kernel real-time clock.");
#endif
}
示例14: main
int
main(int argc, char *argv[])
{
#if TEST_VALID
int i;
int r, prev, prevprev;
int how_many_periodics = 0;
#endif
CYG_TEST_INIT();
CYG_TEST_INFO("Starting tests from testcase " __FILE__ " for C library "
"rand() function");
CYG_TEST_INFO("This test tests the distribution of random numbers and");
CYG_TEST_INFO("may take some time");
#if TEST_VALID
r = rand() % 2;
prev = r;
r = rand() % 2;
for (i = 0; i < TEST_LENGTH; ++i) {
prevprev = prev;
prev = r;
r = rand() % 2;
if (r == prevprev) {
++how_many_periodics;
}
if (how_many_periodics > (2*TEST_LENGTH)/3) {
break;
}
}
CYG_TEST_PASS_FAIL( (how_many_periodics <= (2*TEST_LENGTH)/3),
"periodicity of rand() in lowest bit");
#else
// TODO: should be an _expected_ fail i.e. XFAIL
CYG_TEST_NA("Chosen rand algorithm is known to fail this test");
#endif
CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
"C library rand() function");
} // main()
示例15: cyg_start
void
cyg_start(void)
{
#ifdef CYGPKG_SNMPAGENT // Do we support SNMP at all?
// Create a main thread, so we can run the scheduler and have time 'pass'
cyg_thread_create(10, // Priority - just a number
net_test, // entry
0, // entry parameter
"Network test", // Name
&stack[0], // Stack
STACK_SIZE, // Size
&thread_handle, // Handle
&thread_data // Thread data structure
);
cyg_thread_resume(thread_handle); // Start it
cyg_scheduler_start();
#else
CYG_TEST_NA( "No SNMP agent in this configuration" );
#endif // CYGPKG_SNMPAGENT - Do we support SNMP at all?
}