return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}};
}
}
- ,{"inarray", nullptr, nullptr, [&]
- {
- return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}};
- }
- }
,{"list", nullptr, nullptr, [&]
{
return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}};
}
}
- ,{"inlist", nullptr, nullptr, [&]
- {
- return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}};
- }
- }
,{"hash", nullptr, nullptr, [&]
{
return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}};
|| param_is_acceptable(param, "Eina_Array *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Array *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, !WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_Hash *", !WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "Eina_Hash *", WANT_OWN, !WANT_OUT)
|| param_is_acceptable(param, "const Eina_Hash *", !WANT_OWN, !WANT_OUT)
).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context);
}
else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *"
- || param.type.c_type == "Eina_Inarray *" || param.type.c_type == "const Eina_Inarray *"
|| param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *"
- || param.type.c_type == "Eina_Inlist *" || param.type.c_type == "const Eina_Inlist *"
|| param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *"
|| param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *"
)
return false;
}
else if (param.type.c_type == "Eina_Array *" || param.type.c_type == "const Eina_Array *"
- || param.type.c_type == "Eina_Inarray *" || param.type.c_type == "const Eina_Inarray *"
|| param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *"
- || param.type.c_type == "Eina_Inlist *" || param.type.c_type == "const Eina_Inlist *"
|| param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *"
|| param.type.c_type == "Eina_Accessor *" || param.type.c_type == "const Eina_Accessor *"
)
|| param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Accessor *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Accessor *", WANT_OWN, WANT_OUT)
return false;
}
else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *"
- || ret_type.c_type == "Eina_Inarray *" || ret_type.c_type == "const Eina_Inarray *"
|| ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *"
- || ret_type.c_type == "Eina_Inlist *" || ret_type.c_type == "const Eina_Inlist *"
|| ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *"
|| ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *"
)
|| param_is_acceptable(param, "Eina_Array *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Array *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inarray *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inarray *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_List *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_List *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT)
- || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT)
|| param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT)
.generate(sink, attributes::unused, context);
}
else if (ret_type.c_type == "Eina_Array *" || ret_type.c_type == "const Eina_Array *"
- || ret_type.c_type == "Eina_Inarray *" || ret_type.c_type == "const Eina_Inarray *"
|| ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *"
- || ret_type.c_type == "Eina_Inlist *" || ret_type.c_type == "const Eina_Inlist *"
|| ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *"
|| ret_type.c_type == "Eina_Accessor *" || ret_type.c_type == "const Eina_Accessor *"
)
return false;
}
else if ((complex && (complex->outer.base_type == "array"
- || complex->outer.base_type == "inarray"
|| complex->outer.base_type == "list"
- || complex->outer.base_type == "inlist"
|| complex->outer.base_type == "iterator"
|| complex->outer.base_type == "hash"))
|| field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *")
return false;
}
else if (complex && (complex->outer.base_type == "array"
- || complex->outer.base_type == "inarray"
|| complex->outer.base_type == "list"
- || complex->outer.base_type == "inlist"
|| complex->outer.base_type == "iterator"))
{
// Always assumes pointer
c.outer.base_type = "Eina.List";
return c;
}}
- , {"inlist", nullptr, nullptr, [&]
- {
- complex_type_def c = complex;
- c.outer.base_type = "Eina.Inlist";
- return c;
- }}
, {"array", nullptr, nullptr, [&]
{
complex_type_def c = complex;
c.outer.base_type = "Eina.Array";
return c;
}}
- , {"inarray", nullptr, nullptr, [&]
- {
- complex_type_def c = complex;
- c.outer.base_type = "Eina.Inarray";
- return c;
- }}
, {"hash", nullptr, nullptr
, [&]
{
arr.Dispose();
}
- // //
- // Code Generation
- //
-
- // Integer //
-
- public static void test_eina_inarray_int_in()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<int>();
- arr.Append(base_seq_int);
- Test.Assert(t.EinaInarrayIntIn(arr));
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_int_in_own()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<int>();
- arr.Append(base_seq_int);
- Test.Assert(t.EinaInarrayIntInOwn(arr));
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayIntInOwn());
- }
-
- public static void test_eina_inarray_int_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<int> arr;
- Test.Assert(t.EinaInarrayIntOut(out arr));
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
- Test.Assert(arr.Append(append_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayIntOut());
- }
-
- public static void test_eina_inarray_int_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<int> arr;
- Test.Assert(t.EinaInarrayIntOutOwn(out arr));
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
- Test.Assert(arr.Append(append_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_int_return()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayIntReturn();
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
- Test.Assert(arr.Append(append_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayIntReturn());
- }
-
- public static void test_eina_inarray_int_return_own()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayIntReturnOwn();
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_int));
- Test.Assert(arr.Append(append_seq_int));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- // String //
- public static void test_eina_inarray_str_in()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<string>();
- arr.Append(base_seq_str);
- Test.Assert(t.EinaInarrayStrIn(arr));
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_str_in_own()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<string>();
- arr.Append(base_seq_str);
- Test.Assert(t.EinaInarrayStrInOwn(arr));
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayStrInOwn());
- }
-
- public static void test_eina_inarray_str_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<string> arr;
- Test.Assert(t.EinaInarrayStrOut(out arr));
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
- Test.Assert(arr.Append(append_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayStrOut());
- }
-
- public static void test_eina_inarray_str_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<string> arr;
- Test.Assert(t.EinaInarrayStrOutOwn(out arr));
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
- Test.Assert(arr.Append(append_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_str_return()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayStrReturn();
- Test.Assert(!arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
- Test.Assert(arr.Append(append_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayStrReturn());
- }
-
- public static void test_eina_inarray_str_return_own()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayStrReturnOwn();
- Test.Assert(arr.Own);
- Test.Assert(arr.ToArray().SequenceEqual(base_seq_str));
- Test.Assert(arr.Append(append_seq_str));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- // Object //
-
- public static void test_eina_inarray_obj_in()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<Dummy.Numberwrapper>();
- arr.Append(BaseSeqObj());
- Test.Assert(t.EinaInarrayObjIn(arr));
- Test.Assert(arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj());
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_obj_in_own()
- {
- var t = new Dummy.TestObject();
- var arr = new Eina.Inarray<Dummy.Numberwrapper>();
- arr.Append(BaseSeqObj());
- Test.Assert(t.EinaInarrayObjInOwn(arr));
- Test.Assert(!arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj());
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayObjInOwn());
- }
-
- public static void test_eina_inarray_obj_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<Dummy.Numberwrapper> arr;
- Test.Assert(t.EinaInarrayObjOut(out arr));
- Test.Assert(!arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
- Test.Assert(arr.Append(AppendSeqObj()));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayObjOut());
- }
-
- public static void test_eina_inarray_obj_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inarray<Dummy.Numberwrapper> arr;
- Test.Assert(t.EinaInarrayObjOutOwn(out arr));
- Test.Assert(arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
- Test.Assert(arr.Append(AppendSeqObj()));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_obj_return()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayObjReturn();
- Test.Assert(!arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
- Test.Assert(arr.Append(AppendSeqObj()));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInarrayObjReturn());
- }
-
- public static void test_eina_inarray_obj_return_own()
- {
- var t = new Dummy.TestObject();
- var arr = t.EinaInarrayObjReturnOwn();
- Test.Assert(arr.Own);
- NumberwrapperSequenceAssertEqual(arr.ToArray(), BaseSeqObj());
- Test.Assert(arr.Append(AppendSeqObj()));
- arr.Dispose();
- Test.Assert(arr.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inarray_obj_return_in_same_id()
- {
- var t = new Dummy.TestObject();
- var cmp = BaseSeqObj();
- var a = new Eina.Inarray<Dummy.Numberwrapper>();
- a.Append(cmp);
- var b = t.EinaInarrayObjReturnIn(a);
- NumberwrapperSequenceAssertEqual(a.ToArray(), b.ToArray());
- NumberwrapperSequenceAssertEqual(a.ToArray(), BaseSeqObj());
- int len = a.Length;
- for (int i=0; i < len; ++i)
- {
- Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
- Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
- }
- a.Dispose();
- }
}
class TestEinaList
}
}
- // //
- // Code Generation
- //
-
- // Integer //
-
- public static void test_eina_inlist_int_in()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<int>();
- lst.AppendArray(base_seq_int);
- Test.Assert(t.EinaInlistIntIn(lst));
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_int_in_own()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<int>();
- lst.AppendArray(base_seq_int);
- Test.Assert(t.EinaInlistIntInOwn(lst));
- Test.Assert(!lst.Own);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistIntInOwn());
- }
-
- public static void test_eina_inlist_int_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<int> lst;
- Test.Assert(t.EinaInlistIntOut(out lst));
- Test.Assert(!lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistIntOut());
- }
-
- public static void test_eina_inlist_int_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<int> lst;
- Test.Assert(t.EinaInlistIntOutOwn(out lst));
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
- lst.AppendArray(append_seq_int);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_int_return()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistIntReturn();
- Test.Assert(!lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistIntReturn());
- }
-
- public static void test_eina_inlist_int_return_own()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistIntReturnOwn();
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
- lst.AppendArray(append_seq_int);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- // String //
- public static void test_eina_inlist_str_in()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<string>();
- lst.AppendArray(base_seq_str);
- Test.Assert(t.EinaInlistStrIn(lst));
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_str_in_own()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<string>();
- lst.AppendArray(base_seq_str);
- Test.Assert(t.EinaInlistStrInOwn(lst));
- Test.Assert(!lst.Own);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistStrInOwn());
- }
-
- public static void test_eina_inlist_str_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<string> lst;
- Test.Assert(t.EinaInlistStrOut(out lst));
- Test.Assert(!lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistStrOut());
- }
-
- public static void test_eina_inlist_str_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<string> lst;
- Test.Assert(t.EinaInlistStrOutOwn(out lst));
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
- lst.AppendArray(append_seq_str);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_str_return()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistStrReturn();
- Test.Assert(!lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistStrReturn());
- }
-
- public static void test_eina_inlist_str_return_own()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistStrReturnOwn();
- Test.Assert(lst.Own);
- Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
- lst.AppendArray(append_seq_str);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- // Object //
-
- public static void test_eina_inlist_obj_in()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<Dummy.Numberwrapper>();
- lst.AppendArray(BaseSeqObj());
- Test.Assert(t.EinaInlistObjIn(lst));
- Test.Assert(lst.Own);
- NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_obj_in_own()
- {
- var t = new Dummy.TestObject();
- var lst = new Eina.Inlist<Dummy.Numberwrapper>();
- lst.AppendArray(BaseSeqObj());
- Test.Assert(t.EinaInlistObjInOwn(lst));
- Test.Assert(!lst.Own);
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistObjInOwn());
- }
-
- public static void test_eina_inlist_obj_out()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<Dummy.Numberwrapper> lst;
- Test.Assert(t.EinaInlistObjOut(out lst));
- Test.Assert(!lst.Own);
- NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistObjOut());
- }
-
- public static void test_eina_inlist_obj_out_own()
- {
- var t = new Dummy.TestObject();
- Eina.Inlist<Dummy.Numberwrapper> lst;
- Test.Assert(t.EinaInlistObjOutOwn(out lst));
- Test.Assert(lst.Own);
- NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
- lst.AppendArray(AppendSeqObj());
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_obj_return()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistObjReturn();
- Test.Assert(!lst.Own);
- NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- Test.Assert(t.CheckEinaInlistObjReturn());
- }
-
- public static void test_eina_inlist_obj_return_own()
- {
- var t = new Dummy.TestObject();
- var lst = t.EinaInlistObjReturnOwn();
- Test.Assert(lst.Own);
- NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
- lst.AppendArray(AppendSeqObj());
- lst.Dispose();
- Test.Assert(lst.Handle == IntPtr.Zero);
- }
-
- public static void test_eina_inlist_obj_return_in_same_id()
- {
- var t = new Dummy.TestObject();
- var cmp = BaseSeqObj();
- var a = new Eina.Inlist<Dummy.Numberwrapper>();
- a.AppendArray(cmp);
- var b = t.EinaInlistObjReturnIn(a);
- NumberwrapperSequenceAssertEqual(a.ToArray(), b.ToArray());
- NumberwrapperSequenceAssertEqual(a.ToArray(), BaseSeqObj());
- int len = a.Length;
- for (int i=0; i < len; ++i)
- {
- Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
- Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
- }
- }
} // < TestEinaInlist
complex.Farray.Push(0x2A);
complex.Farray.Push(0x42);
- complex.Finarray = new Eina.Inarray<int>();
- complex.Finarray.Push(0x0);
- complex.Finarray.Push(0x2A);
- complex.Finarray.Push(0x42);
-
-
complex.Flist = new Eina.List<string>();
complex.Flist.Append("0x0");
complex.Flist.Append("0x2A");
complex.Flist.Append("0x42");
- complex.Finlist = new Eina.Inlist<int>();
- complex.Finlist.Append(0x0);
- complex.Finlist.Append(0x2A);
- complex.Finlist.Append(0x42);
-
complex.Fhash = new Eina.Hash<string, string>();
complex.Fhash["aa"] = "aaa";
complex.Fhash["bb"] = "bbb";
{
Test.Assert(complex.Farray.ToArray().SequenceEqual(base_seq_int));
- Test.Assert(complex.Finarray.ToArray().SequenceEqual(base_seq_int));
-
Test.Assert(complex.Flist.ToArray().SequenceEqual(base_seq_str));
- Test.Assert(complex.Finlist.ToArray().SequenceEqual(base_seq_int));
-
Test.Assert(complex.Fhash["aa"] == "aaa");
Test.Assert(complex.Fhash["bb"] == "bbb");
Test.Assert(complex.Fhash["cc"] == "ccc");
internal static void checkZeroedStructComplex(Dummy.StructComplex complex)
{
Test.Assert(complex.Farray == null);
- Test.Assert(complex.Finarray == null);
Test.Assert(complex.Flist == null);
- Test.Assert(complex.Finlist == null);
Test.Assert(complex.Fhash == null);
Test.Assert(complex.Fiterator == null);
Test.Assert(complex.Fany_value == null);
struct @free(free) Dummy.StructComplex {
farray: array<ptr(int)>;
- finarray: inarray<int>;
flist: list<string>;
- finlist: inlist<ptr(int)>;
fhash: hash<string, string>;
fiterator: iterator<ptr(int)>;
fany_value: any_value;
return: array<Dummy.Numberwrapper>;
}
- /* Eina Inarray */
-
- /* Integer */
- eina_inarray_int_in {
- params {
- @in arr: inarray<ptr(int)>;
- }
- return: bool;
- }
-
- eina_inarray_int_in_own {
- params {
- @in arr: inarray<free(ptr(int),free) @owned> @owned;
- }
- return: bool;
- }
- check_eina_inarray_int_in_own {
- return: bool;
- }
-
- eina_inarray_int_out {
- params {
- @out arr: inarray<ptr(int)>;
- }
- return: bool;
- }
- check_eina_inarray_int_out {
- return: bool;
- }
-
- eina_inarray_int_out_own {
- params {
- @out arr: inarray<free(ptr(int),free) @owned> @owned;
- }
- return: bool;
- }
-
- eina_inarray_int_return {
- return: inarray<int>;
- }
- check_eina_inarray_int_return {
- return: bool;
- }
-
- eina_inarray_int_return_own {
- return: inarray<free(ptr(int),free) @owned> @owned;
- }
-
- /* String */
- eina_inarray_str_in {
- params {
- @in arr: inarray<string>;
- }
- return: bool;
- }
-
- eina_inarray_str_in_own {
- params {
- @in arr: inarray<mstring @owned> @owned;
- }
- return: bool;
- }
- check_eina_inarray_str_in_own {
- return: bool;
- }
-
- eina_inarray_str_out {
- params {
- @out arr: inarray<string>;
- }
- return: bool;
- }
- check_eina_inarray_str_out {
- return: bool;
- }
-
- eina_inarray_str_out_own {
- params {
- @out arr: inarray<mstring @owned> @owned;
- }
- return: bool;
- }
-
- eina_inarray_str_return {
- return: inarray<string>;
- }
- check_eina_inarray_str_return {
- return: bool;
- }
-
- eina_inarray_str_return_own {
- return: inarray<mstring @owned> @owned;
- }
-
- /* Object */
- eina_inarray_obj_in {
- params {
- @in arr: inarray<Dummy.Numberwrapper>;
- }
- return: bool;
- }
-
- eina_inarray_obj_in_own {
- params {
- @in arr: inarray<Dummy.Numberwrapper @owned> @owned;
- }
- return: bool;
- }
- check_eina_inarray_obj_in_own {
- return: bool;
- }
-
- eina_inarray_obj_out {
- params {
- @out arr: inarray<Dummy.Numberwrapper>;
- }
- return: bool;
- }
- check_eina_inarray_obj_out {
- return: bool;
- }
-
- eina_inarray_obj_out_own {
- params {
- @out arr: inarray<Dummy.Numberwrapper @owned> @owned;
- }
- return: bool;
- }
-
- eina_inarray_obj_return {
- return: inarray<Dummy.Numberwrapper>;
- }
- check_eina_inarray_obj_return {
- return: bool;
- }
-
- eina_inarray_obj_return_own {
- return: inarray<Dummy.Numberwrapper @owned> @owned;
- }
-
- eina_inarray_obj_return_in {
- params {
- @in arr: inarray<Dummy.Numberwrapper>;
- }
- return: inarray<Dummy.Numberwrapper>;
- }
-
/* Eina List */
/* Integer */
return: list<Dummy.Numberwrapper>;
}
- /* Eina Inlist */
-
- /* Integer */
- eina_inlist_int_in {
- params {
- @in lst: inlist<int>;
- }
- return: bool;
- }
-
- eina_inlist_int_in_own {
- params {
- @in lst: inlist<free(ptr(int),free) @owned> @owned;
- }
- return: bool;
- }
- check_eina_inlist_int_in_own {
- return: bool;
- }
-
- eina_inlist_int_out {
- params {
- @out lst: inlist<int>;
- }
- return: bool;
- }
- check_eina_inlist_int_out {
- return: bool;
- }
-
- eina_inlist_int_out_own {
- params {
- @out lst: inlist<free(ptr(int),free) @owned> @owned;
- }
- return: bool;
- }
-
- eina_inlist_int_return {
- return: inlist<int>;
- }
- check_eina_inlist_int_return {
- return: bool;
- }
-
- eina_inlist_int_return_own {
- return: inlist<free(ptr(int),free) @owned> @owned;
- }
-
- /* String */
- eina_inlist_str_in {
- params {
- @in lst: inlist<string>;
- }
- return: bool;
- }
-
- eina_inlist_str_in_own {
- params {
- @in lst: inlist<mstring @owned> @owned;
- }
- return: bool;
- }
- check_eina_inlist_str_in_own {
- return: bool;
- }
-
- eina_inlist_str_out {
- params {
- @out lst: inlist<string>;
- }
- return: bool;
- }
- check_eina_inlist_str_out {
- return: bool;
- }
-
- eina_inlist_str_out_own {
- params {
- @out lst: inlist<mstring @owned> @owned;
- }
- return: bool;
- }
-
- eina_inlist_str_return {
- return: inlist<string>;
- }
- check_eina_inlist_str_return {
- return: bool;
- }
-
- eina_inlist_str_return_own {
- return: inlist<mstring @owned> @owned;
- }
-
- /* Object */
- eina_inlist_obj_in {
- params {
- @in lst: inlist<Dummy.Numberwrapper>;
- }
- return: bool;
- }
-
- eina_inlist_obj_in_own {
- params {
- @in lst: inlist<Dummy.Numberwrapper @owned> @owned;
- }
- return: bool;
- }
- check_eina_inlist_obj_in_own {
- return: bool;
- }
-
- eina_inlist_obj_out {
- params {
- @out lst: inlist<Dummy.Numberwrapper>;
- }
- return: bool;
- }
- check_eina_inlist_obj_out {
- return: bool;
- }
-
- eina_inlist_obj_out_own {
- params {
- @out lst: inlist<Dummy.Numberwrapper @owned> @owned;
- }
- return: bool;
- }
-
- eina_inlist_obj_return {
- return: inlist<Dummy.Numberwrapper>;
- }
- check_eina_inlist_obj_return {
- return: bool;
- }
-
- eina_inlist_obj_return_own {
- return: inlist<Dummy.Numberwrapper @owned> @owned;
- }
-
- eina_inlist_obj_return_in {
- params {
- @in lst: inlist<Dummy.Numberwrapper>;
- }
- return: inlist<Dummy.Numberwrapper>;
- }
-
-
// Eina Hash //
// Integer //
eina_array_push(complex->farray, _new_int(0x2A));
eina_array_push(complex->farray, _new_int(0x42));
- complex->finarray = eina_inarray_new(sizeof(int), 0);
- eina_inarray_push(complex->finarray, _int_ref(0x0));
- eina_inarray_push(complex->finarray, _int_ref(0x2A));
- eina_inarray_push(complex->finarray, _int_ref(0x42));
-
complex->flist = eina_list_append(complex->flist, strdup("0x0"));
complex->flist = eina_list_append(complex->flist, strdup("0x2A"));
complex->flist = eina_list_append(complex->flist, strdup("0x42"));
- complex->finlist = eina_inlist_append(complex->finlist, _new_inlist_int(0x0));
- complex->finlist = eina_inlist_append(complex->finlist, _new_inlist_int(0x2A));
- complex->finlist = eina_inlist_append(complex->finlist, _new_inlist_int(0x42));
-
complex->fhash = eina_hash_string_superfast_new(NULL);
eina_hash_add(complex->fhash, "aa", strdup("aaa"));
eina_hash_add(complex->fhash, "bb", strdup("bbb"));
if (!_array_int_equal(complex->farray, base_seq_int, base_seq_int_size))
return EINA_FALSE;
- if (!_inarray_int_equal(complex->finarray, base_seq_int, base_seq_int_size))
- return EINA_FALSE;
-
if (!_list_str_equal(complex->flist, base_seq_str, base_seq_str_size))
return EINA_FALSE;
- if (!_inlist_int_equal(complex->finlist, base_seq_int, base_seq_int_size))
- return EINA_FALSE;
-
if (!_hash_str_check(complex->fhash, "aa", "aaa")
|| !_hash_str_check(complex->fhash, "bb", "bbb")
|| !_hash_str_check(complex->fhash, "cc", "ccc"))