Ejemplo n.º 1
0
DEF_TEST(ColorSpace_Serialize, r) {
    test_serialize(r, SkColorSpace::MakeSRGB(), true);
    test_serialize(r, SkColorSpace::MakeSRGBLinear(), true);

    auto test = [&](const char* path) {
        sk_sp<SkData> data = GetResourceAsData(path);

        skcms_ICCProfile profile;
        REPORTER_ASSERT(r, skcms_Parse(data->data(), data->size(), &profile));

        sk_sp<SkColorSpace> space = SkColorSpace::Make(profile);
        REPORTER_ASSERT(r, space);

        test_serialize(r, space, false);
    };
    test("icc_profiles/HP_ZR30w.icc");
    test("icc_profiles/HP_Z32x.icc");

    skcms_TransferFunction fn;
    fn.a = 1.0f;
    fn.b = 0.0f;
    fn.c = 1.0f;
    fn.d = 0.5f;
    fn.e = 0.0f;
    fn.f = 0.0f;
    fn.g = 1.0f;
    skcms_Matrix3x3 toXYZ = {{
        { 1, 0, 0 },
        { 0, 1, 0 },
        { 0, 0, 1 },
    }};
    test_serialize(r, SkColorSpace::MakeRGB(fn, toXYZ), false);
}
static int test_index_manager()
{
	init_poc_environment();

	test_logical_index_building();
	test_serialize();
	test_deserialize();
	test_logical_index_scan();
	bulk_test_logical_index_scan();
	int tmp = 0;
	while (true)
	{
	cout << "Input sec_code: ";
	cin >> tmp;
	test_scan_filter_performance(tmp);
	test_index_filter_performance(tmp);
	}
	Environment::getInstance()->~Environment();



//// For testing
//	init_tt_environment();
//	test_print_tt();

	return 0;
}
Ejemplo n.º 3
0
int main(int argc, char** argv)
{
	test_determinisation();
	test_epsilon_deleting();
	test_parsing();
	test_parsing_2();
	test_serialize();
}
Ejemplo n.º 4
0
int main(int argc, char **argv)
{
	test_extended_key();
	test_serialize();
	test_vector_1();
	test_vector_2();

	// Keep valgrind happy
	ERR_remove_state(0);

	return 0;
}
Ejemplo n.º 5
0
int
main(int argc,
     const char *const argv[])
{
  GNUNET_log_setup ("test-jsonapi",
                    "WARNING",
                    NULL);
  if (0 != test_spec_jsonapi ())
    return 1;
  if (0 != test_serialize ())
    return 1;
  if (0 != test_document ())
    return 1;
  if (0 != test_document_error ())
    return 1;
  return 0;
}