TEST ()
{
  GeglBuffer    *buffer;
  GeglRectangle  rect = {0, 0, 20, 20};

  test_start();
  buffer = gegl_buffer_new (&rect, babl_format ("Y float"));
  vgrad (buffer);
  print_buffer (buffer);
  g_object_unref (buffer);
  test_end();
}
int
main (void)
{
  test_start ();

  check_set ();
  check_set_str (1024);

  test_end ();

  return 0;
}
Beispiel #3
0
void
task2(intptr_t exinf)
{
	ER_UINT	ercd;
	ID		somid;

	test_start(__FILE__);

	check_point(1);
	ercd = get_som(&somid);
	check_ercd(ercd, E_OK);

	check_assert(somid == SOM1);

	WAIT(task2_flag);

	check_point(4);
	ercd = chg_som(SOM2);
	check_ercd(ercd, E_OK);

	ercd = get_som(&somid);
	check_ercd(ercd, E_OK);

	check_assert(somid == SOM1);

	WAIT(task2_flag);

	check_point(8);
	WAIT(task2_flag);

	check_point(14);
	WAIT(task2_flag);

	check_point(19);
	ercd = sta_cyc(CYC1);
	check_ercd(ercd, E_OK);

	ercd = get_som(&somid);
	check_ercd(ercd, E_OK);

	check_assert(somid == SOM1);

	WAIT(task2_flag);

	check_point(25);
	WAIT(task2_flag);

	check_point(30);
	WAIT(task2_flag);

	check_point(0);
}
Beispiel #4
0
int
main (void)
{
  test_start ();

  check_different_precisions ();

  tgeneric_template ("mul_i.dsc", 2, 1024, 7, 1024);

  test_end ();

  return 0;
}
Beispiel #5
0
int
main (void)
{
  test_start ();

  data_check_template ("neg.dsc", "neg.dat");

  tgeneric_template ("neg.dsc", 2, 1024, 1, 0);

  test_end ();

  return 0;
}
Beispiel #6
0
int
main (void)
{
  DECL_FUNC (CCS, f, mpc_pow_si);
  test_start ();
  data_check (f, "pow_si.dat");

  compare_mpc_pow (100, 5, 19);

  test_end ();

  return 0;
}
Beispiel #7
0
int
main (void)
{
  DECL_FUNC (CCS, f, mpc_mul_2si);

  test_start ();

  tgeneric (f, 2, 1024, 7, -1);

  test_end ();

  return 0;
}
Beispiel #8
0
int
main (void)
{
    DECL_FUNC (CUUC, f, mpc_ui_ui_sub);

    test_start ();

    tgeneric (f, 2, 1024, 7, -1);

    test_end ();

    return 0;
}
Beispiel #9
0
gint
main (gint    argc,
      gchar **argv)
{
  long ticks;

  test_start ();
  gegl_init (&argc, &argv);
  gegl_exit ();
  ticks = babl_ticks ()-ticks_start;
  g_print ("@ %s: %.2f seconds\n", "init", (ticks / 1000000.0));
  return 0;
}
TEST ()
{
  GeglBuffer    *buffer, *buffer2;
  GeglRectangle  bound = {0, 0, 20, 20};
  test_start ();
  buffer = gegl_buffer_new (&bound, babl_format ("Y float"));
  vgrad (buffer);
  buffer2 = gegl_buffer_dup (buffer);
  gegl_buffer_destroy (buffer);
  print_buffer (buffer2);
  gegl_buffer_destroy (buffer2);
  test_end ();
}
Beispiel #11
0
int
main (void)
{
    DECL_FUNC (CCU, f, mpc_div_2exp);

    test_start ();

    tgeneric (f, 2, 1024, 7, -1);

    test_end ();

    return 0;
}
Beispiel #12
0
int
main (void)
{
  test_start ();

  data_check_template ("asin.dsc", "asin.dat");

  tgeneric_template ("asin.dsc", 2, 512, 7, 7);

  test_end ();

  return 0;
}
Beispiel #13
0
int
main (void)
{
  DECL_FUNC (FC, f, mpc_imag);

  test_start ();

  tgeneric (f, 2, 1024, 1, 4096);

  test_end ();

  return 0;
}
Beispiel #14
0
TEST ()
{
  GeglBuffer    *buffer;
  GeglRectangle  rect = {0, 0, 20, 20};

  test_start ();

  buffer = gegl_buffer_new (&rect, babl_format ("Y float"));
  print_buffer (buffer);
  gegl_buffer_destroy (buffer);

  test_end ();
}
Beispiel #15
0
static int
test_file_server_serv_connect()
{
    test_start("fs serv_connect");
    for (int i = 0; i < 5; i++) {
        serv_connection_t c = serv_connect("/fileserv/*");
        test_assert(c.error == ESUCCESS);
        test_assert(c.paramBuffer.err == ESUCCESS);
        strcpy(c.paramBuffer.vaddr, "test");
        serv_disconnect(&c);
    }
    return test_success();
}
Beispiel #16
0
/**
 * \b main_thread_func
 *
 * Entry point for main application thread.
 *
 * This is the first thread that will be executed when the OS is started.
 *
 * @param[in] data Unused (optional thread entry parameter)
 *
 * @return None
 */
static void main_thread_func (uint32_t data)
{
    uint32_t test_status;

    /* Put a message out on the UART */
    ATOMLOG("Go\n");

    /* Start test. All tests use the same start API. */
    test_status = test_start();

    /* Check main thread stack usage (if enabled) */
#ifdef ATOM_STACK_CHECKING
    if (test_status == 0)
    {
        uint32_t used_bytes, free_bytes;

        /* Check idle thread stack usage */
        if (atomThreadStackCheck (&main_tcb, &used_bytes, &free_bytes) == ATOM_OK)
        {
            /* Check the thread did not use up to the end of stack */
            if (free_bytes == 0)
            {
                ATOMLOG("Main stack overflow\n");
                test_status++;
            }

            /* Log the stack usage */
#ifdef TESTS_LOG_STACK_USAGE
            ATOMLOG("MainUse:%d\n", used_bytes);
#endif
        }

    }
#endif

    /* Log final status */
    if (test_status == 0)
    {
        ATOMLOG("Pass\n");
    }
    else
    {
        ATOMLOG("Fail(%d)\n", test_status);
    }

    /* Test finished, sit idle */
    while (1)
    {
        atomTimerDelay(SYSTEM_TICKS_PER_SEC);
    }
}
Beispiel #17
0
int
main(void)
{
	test_start("Dispatch Apply");

	volatile __block int32_t count = 0;
	const int32_t final = 32;

	dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
	test_ptr_notnull("dispatch_get_concurrent_queue", queue);

	dispatch_apply(final, queue, ^(size_t i __attribute__((unused))) {
		dispatch_atomic_inc(&count);
	});
Beispiel #18
0
int
main (void)
{
  DECL_FUNC (CCI, f, mpc_mul_i);

  test_start ();

  check_different_precisions ();
  tgeneric (f, 2, 1024, 7, -1);

  test_end ();

  return 0;
}
Beispiel #19
0
/**
 * Tests whether the error flag is cleared in correct way.
 */
void test_clear_error(void)
{
	test_start();
	int err = dtree_open(NULL);
	fail_on_success(err, "Open of NULL was successful");
	fail_on_false(dtree_iserror(), "No error is indicated");

	err = dtree_open("device-tree");
	fail_on_error(err, "Can not open testing device-tree");
	fail_on_true(dtree_iserror(), "The error was not cleared");

	dtree_close();
	test_end();
}
Beispiel #20
0
int
main (void)
{
  DECL_FUNC (CCF, f, mpc_pow_fr);
  test_start ();

  test_reuse ();
  data_check (f, "pow_fr.dat");
  tgeneric (f, 2, 1024, 7, 10);

  test_end ();

  return 0;
}
Beispiel #21
0
int
main (void)
{
  DECL_FUNC (CCU, f, mpc_add_ui);

  test_start ();

  check_ternary_value ();
  tgeneric (f, 2, 1024, 7, -1);

  test_end ();

  return 0;
}
Beispiel #22
0
int
main (void)
{
  DECL_FUNC (FC, f, mpc_abs);

  test_start ();

  tgeneric (f, 2, 1024, 1, 0);
  data_check (f, "abs.dat");

  test_end ();

  return 0;
}
int
main (void)
{
  DECL_FUNC (CC, f, mpc_sqrt);

  test_start ();

  data_check (f, "sqrt.dat");
  tgeneric (f, 2, 1024, 7, 256);

  test_end ();

  return 0;
}
Beispiel #24
0
int
main (void)
{
  DECL_FUNC (CC, f, mpc_proj);

  test_start ();

  tgeneric (f, 2, 1024, 1, 4096);
  data_check (f, "proj.dat");

  test_end ();

  return 0;
}
TEST ()
{
  GeglBuffer    *buffer, *buffer2;
  GeglRectangle  bound = {0, 0, 20, 20};
  test_start ();
  buffer = gegl_buffer_new (&bound, babl_format ("Y float"));
  vgrad (buffer);
  buffer2 = gegl_buffer_dup (buffer);
  checkerboard (buffer, 3, 0.0, 1.0);
  print_buffer (buffer);
  g_object_unref (buffer);
  g_object_unref (buffer2);
  test_end ();
}
Beispiel #26
0
int
main (void)
{
  DECL_FUNC (CCF, f, mpc_add_fr);
  test_start ();

  check_ternary_value (1024, 1);

  data_check (f, "add_fr.dat");
  tgeneric (f, 2, 1024, 7, 10);

  test_end ();
  return 0;
}
Beispiel #27
0
int
main (void)
{
    DECL_FUNC (FC, f, mpc_norm);

    test_start ();

    data_check (f, "norm.dat");
    tgeneric (f, 2, 1024, 1, 4096);

    test_end ();

    return 0;
}
Beispiel #28
0
int
main (void)
{
  DECL_FUNC (CC, f, mpc_tanh);

  test_start ();

  data_check (f, "tanh.dat");
  tgeneric (f, 2, 512, 7, 4);

  test_end ();

  return 0;
}
Beispiel #29
0
int
main (void)
{
  DECL_FUNC (CC, f, mpc_asin);

  test_start ();

  data_check (f, "asin.dat");
  tgeneric (f, 2, 512, 7, 7);

  test_end ();

  return 0;
}
Beispiel #30
0
int
main (void)
{
  DECL_FUNC (CC, f, mpc_log);

  test_start ();

  data_check (f, "log.dat");
  tgeneric (f, 2, 512, 7, 128);

  test_end ();

  return 0;
}