Exemple #1
0
int main()
{
  test_basic();
  test_capacity();
  test_comparison();
  test_composite_key();
  test_conv_iterators();
  test_copy_assignment();
  test_hash_ops();
  test_iterators();
  test_key_extractors();
  test_list_ops();
  test_modifiers();
  test_mpl_ops();
  test_observers();
  test_projection();
  test_range();
  test_rank_ops();
  test_rearrange();
  test_safe_mode();
  test_serialization();
  test_set_ops();
  test_special_set_ops();
  test_update();

  return boost::report_errors();
}
Exemple #2
0
void test_array()
{
    START_CODE(node)
	IF
	    IN
                RAW_PARAM(3)
		ARRAY_CONSTANT(array_create(3, 1,2,3));
	    END;
	THEN
	    CATEGORY_CONSTANT(1)
	ELSE
	    CATEGORY_CONSTANT(2)
	END;
    END_CODE;

    node_print(node);

    node = test_serialization(node);

    environment_t env = test_environment();

    constant_t v = node_eval(node, &env);
    assert(v.c == 2);
    assert(v.type == CONSTANT_CATEGORY);

    env.row->inputs[3].category = 3;
    v = node_eval(node, &env);
    assert(v.c == 1);
    assert(v.type == CONSTANT_CATEGORY);

    row_destroy(env.row);
    node_destroy(node);
}
Exemple #3
0
void
TestCB_run_tests() {
    TestBatch *batch = TestBatch_new(55);
    TestBatch_Plan(batch);

    test_vcatf_s(batch);
    test_vcatf_null_string(batch);
    test_vcatf_cb(batch);
    test_vcatf_obj(batch);
    test_vcatf_null_obj(batch);
    test_vcatf_i8(batch);
    test_vcatf_i32(batch);
    test_vcatf_i64(batch);
    test_vcatf_u8(batch);
    test_vcatf_u32(batch);
    test_vcatf_u64(batch);
    test_vcatf_f64(batch);
    test_vcatf_x32(batch);
    test_Cat(batch);
    test_Mimic_and_Clone(batch);
    test_Code_Point_At_and_From(batch);
    test_Find(batch);
    test_SubString(batch);
    test_Nip_and_Chop(batch);
    test_Truncate(batch);
    test_Trim(batch);
    test_To_F64(batch);
    test_To_I64(batch);
    test_serialization(batch);

    DECREF(batch);
}
Exemple #4
0
void test(){
	 testQueue(50000);
	 test_serialization(500);
	 testRule(50000);
	 testTree(5000);
	 testqbm(5000);

}
Exemple #5
0
void test_if()
{
    START_CODE(node)
	IF
	    GT
		ADD
		    RAW_PARAM(0)
		    RAW_PARAM(1)
		END;
		RAW_PARAM(2)
	    END;
	THEN
	    CATEGORY_CONSTANT(1)
	ELSE
	    CATEGORY_CONSTANT(2)
	END;
    END_CODE;

    node_print(node);

    node = test_serialization(node);

    environment_t env = test_environment();
    constant_t v = node_eval(node, &env);
    constant_print(&v);puts("\n");

    v = node_eval(node, &env);
    assert(v.c == 2);
    assert(v.type == CONSTANT_CATEGORY);
    env.row->inputs[2].value = 2.5;
    v = node_eval(node, &env);
    assert(v.c == 1);
    assert(v.type == CONSTANT_CATEGORY);

    row_destroy(env.row);
    node_destroy(node);
}
int main()
{
  test_serialization();
  return boost::report_errors();
}
int test_main(int,char *[])
{
  test_serialization();
  return 0;
}