summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno da Silva Belo <bruno.belo@expertisesolutions.com.br>2019-11-06 23:34:18 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-11-06 23:46:18 -0300
commitbd446fdcf92d961766ac67b98f45022637dc4dde (patch)
treeee622a9f5af56d3ee46bab603f0e8a929dc1559d /src
parentda5c0c63f212078c215219ca0e97c8dbc1c576de (diff)
csharp:comma have whitespace after and none before
Reviewers: felipealmeida, lauromoura, YOhoho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10575
Diffstat (limited to 'src')
-rw-r--r--src/bin/eolian_mono/eolian/mono/async_function_definition.hh6
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh6
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_pointer.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh14
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh2
-rw-r--r--src/tests/efl_mono/Eina.cs88
-rw-r--r--src/tests/efl_mono/EinaTestData.cs49
-rw-r--r--src/tests/efl_mono/Promises.cs5
9 files changed, 91 insertions, 83 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
index 089b115..bf00dda 100644
--- a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh
@@ -95,7 +95,7 @@ struct async_function_declaration_generator
95 if (!as_generator( 95 if (!as_generator(
96 scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n" 96 scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
97 << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n" 97 << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
98 << scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << 98 << scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ", ") <<
99 " System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n" 99 " System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n"
100 ).generate(sink, f.parameters, context)) 100 ).generate(sink, f.parameters, context))
101 return false; 101 return false;
@@ -153,9 +153,9 @@ struct async_function_definition_generator
153 if(!as_generator( 153 if(!as_generator(
154 scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n" 154 scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
155 << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n" 155 << scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
156 << scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n" 156 << scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ", ") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n"
157 << scope_tab << "{\n" 157 << scope_tab << "{\n"
158 << scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ",") << ");\n" 158 << scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ", ") << ");\n"
159 << scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n" 159 << scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n"
160 << scope_tab << "}\n\n" 160 << scope_tab << "}\n\n"
161 ).generate(sink, std::make_tuple(f.parameters, param_forwarding), context)) 161 ).generate(sink, std::make_tuple(f.parameters, param_forwarding), context))
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 44dd916..51bb17c 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -223,7 +223,7 @@ struct function_definition_generator
223 << scope_tab(2) << eolian_mono::function_definition_preamble() 223 << scope_tab(2) << eolian_mono::function_definition_preamble()
224 << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate(" 224 << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate("
225 << self 225 << self
226 << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") 226 << ((!f.is_static && (f.parameters.size() > 0)) ? ", " : "")
227 << (argument_invocation % ", ") << ");\n" 227 << (argument_invocation % ", ") << ");\n"
228 << scope_tab(2) << eolian_mono::function_definition_epilogue() 228 << scope_tab(2) << eolian_mono::function_definition_epilogue()
229 << scope_tab(1) << "}\n\n") 229 << scope_tab(1) << "}\n\n")
@@ -497,8 +497,8 @@ struct property_wrapper_definition_generator
497 << argument(false) << " = default(" << type(true) << ");\n" 497 << argument(false) << " = default(" << type(true) << ");\n"
498 ) 498 )
499 << scope_tab(3) << name_helpers::managed_method_name(*property.getter) 499 << scope_tab(3) << name_helpers::managed_method_name(*property.getter)
500 << "(" << (("out _out_" << argument(false)) % ",") << ");\n" 500 << "(" << (("out _out_" << argument(false)) % ", ") << ");\n"
501 << scope_tab(3) << "return (" << (("_out_"<< argument(false)) % ",") << ");\n" 501 << scope_tab(3) << "return (" << (("_out_"<< argument(false)) % ", ") << ");\n"
502 << scope_tab(2) << "}" << "\n" 502 << scope_tab(2) << "}" << "\n"
503 ).generate(sink, std::make_tuple(parameters, parameters, parameters), context)) 503 ).generate(sink, std::make_tuple(parameters, parameters, parameters), context))
504 return false; 504 return false;
diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
index 0e80659..aee11ea 100644
--- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
@@ -114,7 +114,7 @@ struct function_pointer {
114 << scope_tab << scope_tab << "GC.SuppressFinalize(this);\n" 114 << scope_tab << scope_tab << "GC.SuppressFinalize(this);\n"
115 << scope_tab << "}\n\n" 115 << scope_tab << "}\n\n"
116 116
117 << scope_tab << "internal " << type << " ManagedCb(" << (parameter % ",") << ")\n" 117 << scope_tab << "internal " << type << " ManagedCb(" << (parameter % ", ") << ")\n"
118 << scope_tab << "{\n" 118 << scope_tab << "{\n"
119 << function_definition_preamble << "_cb(_cb_data, " << (argument_invocation % ", ") << ");\n" 119 << function_definition_preamble << "_cb(_cb_data, " << (argument_invocation % ", ") << ");\n"
120 << function_definition_epilogue 120 << function_definition_epilogue
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index f2c2c5a..81d5956 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -132,7 +132,7 @@ struct klass
132 continue; 132 continue;
133 133
134 if(first->type != attributes::class_type::regular && first->type != attributes::class_type::abstract_) 134 if(first->type != attributes::class_type::regular && first->type != attributes::class_type::abstract_)
135 if(!as_generator("\n" << scope_tab << string << " ,").generate(sink, name_helpers::klass_full_interface_name(*first), iface_cxt)) 135 if(!as_generator("\n" << scope_tab << string << ",").generate(sink, name_helpers::klass_full_interface_name(*first), iface_cxt))
136 return false; 136 return false;
137 } 137 }
138 138
@@ -202,9 +202,9 @@ struct klass
202 ( 202 (
203 documentation 203 documentation
204 << "public sealed " << (is_partial ? "partial ":"") << "class " << concrete_name << " :\n" 204 << "public sealed " << (is_partial ? "partial ":"") << "class " << concrete_name << " :\n"
205 << scope_tab << (root ? "Efl.Eo.EoWrapper" : "") << (klass_full_concrete_or_interface_name % "") << "\n" 205 << scope_tab << (root ? "Efl.Eo.EoWrapper" : "") << (klass_full_concrete_or_interface_name % "")
206 << scope_tab << ", " << interface_name << "\n" 206 << ",\n" << scope_tab << interface_name
207 << scope_tab << *(", " << name_helpers::klass_full_concrete_or_interface_name) << "\n" 207 << *(",\n" << scope_tab << name_helpers::klass_full_concrete_or_interface_name) << "\n"
208 << "{\n" 208 << "{\n"
209 ).generate(sink, std::make_tuple(cls, inherit_classes, inherit_interfaces), concrete_cxt)) 209 ).generate(sink, std::make_tuple(cls, inherit_classes, inherit_interfaces), concrete_cxt))
210 return false; 210 return false;
@@ -564,9 +564,9 @@ struct klass
564 << scope_tab << "/// <param name=\"parent\">Parent instance.</param>\n" 564 << scope_tab << "/// <param name=\"parent\">Parent instance.</param>\n"
565 << *(documentation) 565 << *(documentation)
566 // For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters. 566 // For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters.
567 << scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null") << "\n" 567 << scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null")
568 << scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") : " 568 << *(", " << constructor_param ) << ") : "
569 << "base(" << name_helpers::klass_get_name(cls) << "(), parent)\n" 569 << "base(" << name_helpers::klass_get_name(cls) << "(), parent)\n"
570 << scope_tab << "{\n" 570 << scope_tab << "{\n"
571 << (*(scope_tab << scope_tab << constructor_invocation << "\n")) 571 << (*(scope_tab << scope_tab << constructor_invocation << "\n"))
572 << scope_tab << scope_tab << "FinishInstantiation();\n" 572 << scope_tab << scope_tab << "FinishInstantiation();\n"
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index 55e1254..7c7b8f2 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -1536,7 +1536,7 @@ struct constructor_param_generator
1536 1536
1537 if (!as_generator( 1537 if (!as_generator(
1538 efl::eolian::grammar::attribute_reorder<1, -1> 1538 efl::eolian::grammar::attribute_reorder<1, -1>
1539 (type(false, ctor.is_optional) << " " << constructor_parameter_name(ctor) << (ctor.is_optional ? " = null" : "")) % "," 1539 (type(false, ctor.is_optional) << " " << constructor_parameter_name(ctor) << (ctor.is_optional ? " = null" : "")) % ", "
1540 ).generate(sink, params, context)) 1540 ).generate(sink, params, context))
1541 return false; 1541 return false;
1542 // } 1542 // }
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index 31169f1..0b8dece 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -74,7 +74,7 @@ struct part_extension_method_definition_generator
74 << name_helpers::klass_full_concrete_or_interface_name(cls) 74 << name_helpers::klass_full_concrete_or_interface_name(cls)
75 << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n" 75 << ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n"
76 << scope_tab << "{\n" 76 << scope_tab << "{\n"
77 << scope_tab << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\" ,fac);\n" 77 << scope_tab << scope_tab << "return new " << bindableClass << "<" << part_klass_name << ">(\"" << part.name << "\", fac);\n"
78 << scope_tab << "}\n\n" 78 << scope_tab << "}\n\n"
79 ).generate(sink, attributes::unused, context)) 79 ).generate(sink, attributes::unused, context))
80 return false; 80 return false;
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index 4dad199..1dd57dc 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -174,7 +174,8 @@ class TestEinaBinbuf
174 var binbuf = new Eina.Binbuf(base_seq, (uint)base_seq.Length); 174 var binbuf = new Eina.Binbuf(base_seq, (uint)base_seq.Length);
175 Test.Assert(t.EinaBinbufIn(binbuf)); 175 Test.Assert(t.EinaBinbufIn(binbuf));
176 Test.Assert(binbuf.Own); 176 Test.Assert(binbuf.Own);
177 Test.Assert(binbuf.GetBytes().SequenceEqual(new byte[]{43,42,0x0,0x2A,0x42,33})); 177 Test.Assert(binbuf.GetBytes().SequenceEqual(
178 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
178 binbuf.Dispose(); 179 binbuf.Dispose();
179 Test.Assert(binbuf.Handle == IntPtr.Zero); 180 Test.Assert(binbuf.Handle == IntPtr.Zero);
180 } 181 }
@@ -185,7 +186,8 @@ class TestEinaBinbuf
185 var binbuf = new Eina.Binbuf(base_seq, (uint)base_seq.Length); 186 var binbuf = new Eina.Binbuf(base_seq, (uint)base_seq.Length);
186 Test.Assert(t.EinaBinbufInOwn(binbuf)); 187 Test.Assert(t.EinaBinbufInOwn(binbuf));
187 Test.Assert(!binbuf.Own); 188 Test.Assert(!binbuf.Own);
188 Test.Assert(binbuf.GetBytes().SequenceEqual(new byte[]{43,42,0x0,0x2A,0x42,33})); 189 Test.Assert(binbuf.GetBytes().SequenceEqual(
190 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
189 binbuf.Dispose(); 191 binbuf.Dispose();
190 Test.Assert(binbuf.Handle == IntPtr.Zero); 192 Test.Assert(binbuf.Handle == IntPtr.Zero);
191 Test.Assert(t.CheckBinbufInOwn()); 193 Test.Assert(t.CheckBinbufInOwn());
@@ -253,7 +255,8 @@ class TestEinaBinbuf
253 Test.Assert(t.CallEinaBinbufIn(binbuf)); 255 Test.Assert(t.CallEinaBinbufIn(binbuf));
254 Test.Assert(t.binbuf_in_flag); 256 Test.Assert(t.binbuf_in_flag);
255 Test.Assert(binbuf.Own); 257 Test.Assert(binbuf.Own);
256 Test.Assert(binbuf.GetBytes().SequenceEqual(new byte[]{43,42,0x0,0x2A,0x42,33})); 258 Test.Assert(binbuf.GetBytes().SequenceEqual(
259 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
257 binbuf.Dispose(); 260 binbuf.Dispose();
258 Test.Assert(binbuf.Handle == IntPtr.Zero); 261 Test.Assert(binbuf.Handle == IntPtr.Zero);
259 } 262 }
@@ -265,7 +268,8 @@ class TestEinaBinbuf
265 binbuf.Own = false; 268 binbuf.Own = false;
266 Test.Assert(t.CallEinaBinbufInOwn(binbuf)); 269 Test.Assert(t.CallEinaBinbufInOwn(binbuf));
267 Test.Assert(t.binbuf_in_own_flag); 270 Test.Assert(t.binbuf_in_own_flag);
268 Test.Assert(binbuf.GetBytes().SequenceEqual(new byte[]{43,42,0x0,0x2A,0x42,33})); 271 Test.Assert(binbuf.GetBytes().SequenceEqual(
272 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
269 binbuf.Dispose(); 273 binbuf.Dispose();
270 Test.Assert(binbuf.Handle == IntPtr.Zero); 274 Test.Assert(binbuf.Handle == IntPtr.Zero);
271 Test.Assert(t.binbuf_in_own_still_usable()); 275 Test.Assert(t.binbuf_in_own_still_usable());
@@ -378,7 +382,7 @@ class TestEinaSlice
378 var t = new Dummy.TestObject(); 382 var t = new Dummy.TestObject();
379 Test.Assert(t.EinaRwSliceIn(slc)); 383 Test.Assert(t.EinaRwSliceIn(slc));
380 384
381 Test.Assert(slc.GetBytes().SequenceEqual(new byte[3]{0x1,0x2B,0x43})); 385 Test.Assert(slc.GetBytes().SequenceEqual(new byte[3]{0x1, 0x2B, 0x43}));
382 386
383 pinnedRWData.Free(); 387 pinnedRWData.Free();
384 } 388 }
@@ -818,7 +822,7 @@ class TestEinaArray
818 a.SetNumber(88); 822 a.SetNumber(88);
819 b.SetNumber(44); 823 b.SetNumber(44);
820 c.SetNumber(22); 824 c.SetNumber(22);
821 var cmp = new Dummy.Numberwrapper[]{a,b,c}; 825 var cmp = new Dummy.Numberwrapper[]{a, b, c};
822 826
823 var arr = new Eina.Array<Dummy.Numberwrapper>(); 827 var arr = new Eina.Array<Dummy.Numberwrapper>();
824 Test.Assert(arr.Handle != IntPtr.Zero); 828 Test.Assert(arr.Handle != IntPtr.Zero);
@@ -1435,7 +1439,7 @@ class TestEinaInarray
1435 a.SetNumber(88); 1439 a.SetNumber(88);
1436 b.SetNumber(44); 1440 b.SetNumber(44);
1437 c.SetNumber(22); 1441 c.SetNumber(22);
1438 var cmp = new Dummy.Numberwrapper[]{a,b,c}; 1442 var cmp = new Dummy.Numberwrapper[]{a, b, c};
1439 1443
1440 var arr = new Eina.Inarray<Dummy.Numberwrapper>(); 1444 var arr = new Eina.Inarray<Dummy.Numberwrapper>();
1441 Test.Assert(arr.Handle != IntPtr.Zero); 1445 Test.Assert(arr.Handle != IntPtr.Zero);
@@ -1723,10 +1727,9 @@ class TestEinaList
1723 lst.SortedInsert(88); 1727 lst.SortedInsert(88);
1724 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88})); 1728 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88}));
1725 lst.SortedInsert(22); 1729 lst.SortedInsert(22);
1726 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22,88})); 1730 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 88}));
1727 lst.SortedInsert(44); 1731 lst.SortedInsert(44);
1728 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22,44,88})); 1732 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
1729
1730 } 1733 }
1731 1734
1732 public static void sorted_insert_string() 1735 public static void sorted_insert_string()
@@ -1735,10 +1738,9 @@ class TestEinaList
1735 lst.SortedInsert("c"); 1738 lst.SortedInsert("c");
1736 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c"})); 1739 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c"}));
1737 lst.SortedInsert("a"); 1740 lst.SortedInsert("a");
1738 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a","c"})); 1741 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "c"}));
1739 lst.SortedInsert("b"); 1742 lst.SortedInsert("b");
1740 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a","b","c"})); 1743 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
1741
1742 } 1744 }
1743 1745
1744 public static void sorted_insert_stringshare() 1746 public static void sorted_insert_stringshare()
@@ -1747,10 +1749,11 @@ class TestEinaList
1747 lst.SortedInsert("c"); 1749 lst.SortedInsert("c");
1748 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c"})); 1750 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c"}));
1749 lst.SortedInsert("a"); 1751 lst.SortedInsert("a");
1750 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a","c"})); 1752 Test.Assert(
1753 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "c"}));
1751 lst.SortedInsert("b"); 1754 lst.SortedInsert("b");
1752 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a","b","c"})); 1755 Test.Assert(
1753 1756 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "b", "c"}));
1754 } 1757 }
1755 1758
1756 public static void sorted_insert_custom_comparer_natural() 1759 public static void sorted_insert_custom_comparer_natural()
@@ -1790,11 +1793,12 @@ class TestEinaList
1790 lst.SortedInsert(comparator, "The"); 1793 lst.SortedInsert(comparator, "The");
1791 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"The"})); 1794 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"The"}));
1792 lst.SortedInsert(comparator, "Quick"); 1795 lst.SortedInsert(comparator, "Quick");
1793 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"Quick","The"})); 1796 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"Quick", "The"}));
1794 lst.SortedInsert(comparator, "Brown"); 1797 lst.SortedInsert(comparator, "Brown");
1795 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"Brown", "Quick", "The"})); 1798 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"Brown", "Quick", "The"}));
1796 lst.SortedInsert(comparator, "Jumped"); 1799 lst.SortedInsert(comparator, "Jumped");
1797 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"Jumped","Brown", "Quick", "The"})); 1800 Test.Assert(lst.ToArray().SequenceEqual(
1801 new string[]{"Jumped", "Brown", "Quick", "The"}));
1798 } 1802 }
1799 1803
1800 public static void sort_int() 1804 public static void sort_int()
@@ -1804,10 +1808,9 @@ class TestEinaList
1804 lst.Append(22); 1808 lst.Append(22);
1805 lst.Append(11); 1809 lst.Append(11);
1806 lst.Append(44); 1810 lst.Append(44);
1807 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88,22,11,44})); 1811 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 22, 11, 44}));
1808 lst.Sort(); 1812 lst.Sort();
1809 Test.Assert(lst.ToArray().SequenceEqual(new int[]{11,22,44,88})); 1813 Test.Assert(lst.ToArray().SequenceEqual(new int[]{11, 22, 44, 88}));
1810
1811 } 1814 }
1812 1815
1813 public static void sort_string() 1816 public static void sort_string()
@@ -1817,9 +1820,11 @@ class TestEinaList
1817 lst.Append("b"); 1820 lst.Append("b");
1818 lst.Append("a"); 1821 lst.Append("a");
1819 lst.Append("c"); 1822 lst.Append("c");
1820 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"d","b","a","c"})); 1823 Test.Assert(
1824 lst.ToArray().SequenceEqual(new string[]{"d", "b", "a", "c"}));
1821 lst.Sort(); 1825 lst.Sort();
1822 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a","b","c","d"})); 1826 Test.Assert(
1827 lst.ToArray().SequenceEqual(new string[]{"a", "b", "c", "d"}));
1823 } 1828 }
1824 1829
1825 public static void sort_stringshare() 1830 public static void sort_stringshare()
@@ -1829,9 +1834,11 @@ class TestEinaList
1829 lst.Append("b"); 1834 lst.Append("b");
1830 lst.Append("a"); 1835 lst.Append("a");
1831 lst.Append("c"); 1836 lst.Append("c");
1832 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"d","b","a","c"})); 1837 Test.Assert(lst.ToArray().SequenceEqual(
1838 new Eina.Stringshare[]{"d", "b", "a", "c"}));
1833 lst.Sort(); 1839 lst.Sort();
1834 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a","b","c","d"})); 1840 Test.Assert(lst.ToArray().SequenceEqual(
1841 new Eina.Stringshare[]{"a", "b", "c", "d"}));
1835 } 1842 }
1836 1843
1837 public static void reverse_int() 1844 public static void reverse_int()
@@ -1840,10 +1847,9 @@ class TestEinaList
1840 lst.Append(22); 1847 lst.Append(22);
1841 lst.Append(44); 1848 lst.Append(44);
1842 lst.Append(88); 1849 lst.Append(88);
1843 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22,44,88})); 1850 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
1844 lst.Reverse(); 1851 lst.Reverse();
1845 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88,44,22})); 1852 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 44, 22}));
1846
1847 } 1853 }
1848 1854
1849 public static void reverse_string() 1855 public static void reverse_string()
@@ -1852,9 +1858,9 @@ class TestEinaList
1852 lst.Append("a"); 1858 lst.Append("a");
1853 lst.Append("b"); 1859 lst.Append("b");
1854 lst.Append("c"); 1860 lst.Append("c");
1855 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a","b","c"})); 1861 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
1856 lst.Reverse(); 1862 lst.Reverse();
1857 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c","b","a"})); 1863 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c", "b", "a"}));
1858 } 1864 }
1859 1865
1860 public static void reverse_stringshare() 1866 public static void reverse_stringshare()
@@ -1863,9 +1869,11 @@ class TestEinaList
1863 lst.Append("a"); 1869 lst.Append("a");
1864 lst.Append("b"); 1870 lst.Append("b");
1865 lst.Append("c"); 1871 lst.Append("c");
1866 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a","b","c"})); 1872 Test.Assert(
1873 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "b", "c"}));
1867 lst.Reverse(); 1874 lst.Reverse();
1868 Test.Assert(lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c","b","a"})); 1875 Test.Assert(
1876 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c", "b", "a"}));
1869 } 1877 }
1870 1878
1871 public static void eina_list_as_ienumerable_int() 1879 public static void eina_list_as_ienumerable_int()
@@ -1921,7 +1929,7 @@ class TestEinaList
1921 a.SetNumber(88); 1929 a.SetNumber(88);
1922 b.SetNumber(44); 1930 b.SetNumber(44);
1923 c.SetNumber(22); 1931 c.SetNumber(22);
1924 var cmp = new Dummy.Numberwrapper[]{a,b,c}; 1932 var cmp = new Dummy.Numberwrapper[]{a, b, c};
1925 1933
1926 var lst = new Eina.List<Dummy.Numberwrapper>(); 1934 var lst = new Eina.List<Dummy.Numberwrapper>();
1927 lst.Append(a); 1935 lst.Append(a);
@@ -2483,7 +2491,7 @@ class TestEinaInlist
2483 a.SetNumber(88); 2491 a.SetNumber(88);
2484 b.SetNumber(44); 2492 b.SetNumber(44);
2485 c.SetNumber(22); 2493 c.SetNumber(22);
2486 var cmp = new Dummy.Numberwrapper[]{a,b,c}; 2494 var cmp = new Dummy.Numberwrapper[]{a, b, c};
2487 2495
2488 var lst = new Eina.Inlist<Dummy.Numberwrapper>(); 2496 var lst = new Eina.Inlist<Dummy.Numberwrapper>();
2489 lst.Append(a); 2497 lst.Append(a);
@@ -2725,7 +2733,7 @@ class TestEinaHash
2725 public static void test_eina_hash_int_in() 2733 public static void test_eina_hash_int_in()
2726 { 2734 {
2727 var t = new Dummy.TestObject(); 2735 var t = new Dummy.TestObject();
2728 var hsh = new Eina.Hash<int,int>(); 2736 var hsh = new Eina.Hash<int, int>();
2729 hsh[22] = 222; 2737 hsh[22] = 222;
2730 Test.Assert(t.EinaHashIntIn(hsh)); 2738 Test.Assert(t.EinaHashIntIn(hsh));
2731 Test.Assert(hsh.Own); 2739 Test.Assert(hsh.Own);
@@ -2755,7 +2763,7 @@ class TestEinaHash
2755 public static void test_eina_hash_int_out() 2763 public static void test_eina_hash_int_out()
2756 { 2764 {
2757 var t = new Dummy.TestObject(); 2765 var t = new Dummy.TestObject();
2758 Eina.Hash<int,int> hsh; 2766 Eina.Hash<int, int>hsh;
2759 Test.Assert(t.EinaHashIntOut(out hsh)); 2767 Test.Assert(t.EinaHashIntOut(out hsh));
2760 Test.Assert(!hsh.Own); 2768 Test.Assert(!hsh.Own);
2761 Test.Assert(hsh[22] == 222); 2769 Test.Assert(hsh[22] == 222);
@@ -2815,7 +2823,7 @@ class TestEinaHash
2815 public static void test_eina_hash_str_in() 2823 public static void test_eina_hash_str_in()
2816 { 2824 {
2817 var t = new Dummy.TestObject(); 2825 var t = new Dummy.TestObject();
2818 var hsh = new Eina.Hash<string,string>(); 2826 var hsh = new Eina.Hash<string, string>();
2819 hsh["aa"] = "aaa"; 2827 hsh["aa"] = "aaa";
2820 Test.Assert(t.EinaHashStrIn(hsh)); 2828 Test.Assert(t.EinaHashStrIn(hsh));
2821 Test.Assert(hsh.Own); 2829 Test.Assert(hsh.Own);
@@ -2828,7 +2836,7 @@ class TestEinaHash
2828 public static void test_eina_hash_str_in_own() 2836 public static void test_eina_hash_str_in_own()
2829 { 2837 {
2830 var t = new Dummy.TestObject(); 2838 var t = new Dummy.TestObject();
2831 var hsh = new Eina.Hash<string,string>(); 2839 var hsh = new Eina.Hash<string, string>();
2832 hsh["aa"] = "aaa"; 2840 hsh["aa"] = "aaa";
2833 Test.Assert(t.EinaHashStrInOwn(hsh)); 2841 Test.Assert(t.EinaHashStrInOwn(hsh));
2834 Test.Assert(!hsh.Own); 2842 Test.Assert(!hsh.Own);
@@ -2843,7 +2851,7 @@ class TestEinaHash
2843 public static void test_eina_hash_str_out() 2851 public static void test_eina_hash_str_out()
2844 { 2852 {
2845 var t = new Dummy.TestObject(); 2853 var t = new Dummy.TestObject();
2846 Eina.Hash<string,string> hsh; 2854 Eina.Hash<string, string>hsh;
2847 Test.Assert(t.EinaHashStrOut(out hsh)); 2855 Test.Assert(t.EinaHashStrOut(out hsh));
2848 Test.Assert(!hsh.Own); 2856 Test.Assert(!hsh.Own);
2849 Test.Assert(hsh["aa"] == "aaa"); 2857 Test.Assert(hsh["aa"] == "aaa");
@@ -2857,7 +2865,7 @@ class TestEinaHash
2857 public static void test_eina_hash_str_out_own() 2865 public static void test_eina_hash_str_out_own()
2858 { 2866 {
2859 var t = new Dummy.TestObject(); 2867 var t = new Dummy.TestObject();
2860 Eina.Hash<string,string> hsh; 2868 Eina.Hash<string, string>hsh;
2861 Test.Assert(t.EinaHashStrOutOwn(out hsh)); 2869 Test.Assert(t.EinaHashStrOutOwn(out hsh));
2862 Test.Assert(hsh.Own); 2870 Test.Assert(hsh.Own);
2863 Test.Assert(hsh["aa"] == "aaa"); 2871 Test.Assert(hsh["aa"] == "aaa");
diff --git a/src/tests/efl_mono/EinaTestData.cs b/src/tests/efl_mono/EinaTestData.cs
index f2a9d43..5b8c84d 100644
--- a/src/tests/efl_mono/EinaTestData.cs
+++ b/src/tests/efl_mono/EinaTestData.cs
@@ -23,25 +23,26 @@ namespace EinaTestData
23 23
24class BaseSequence 24class BaseSequence
25{ 25{
26 public static byte[] Values() 26 public static byte[] Values() => new byte[3]{0x0, 0x2A, 0x42};
27 {
28 return new byte[3]{0x0,0x2A,0x42};
29 }
30} 27}
31 28
32public static class BaseData 29public static class BaseData
33{ 30{
34 public static readonly int[] base_seq_int = {0x0,0x2A,0x42}; 31 public static readonly int[] base_seq_int = {0x0, 0x2A, 0x42};
35 public static readonly int[] append_seq_int = {42,43,33}; 32 public static readonly int[] append_seq_int = {42, 43, 33};
36 public static readonly int[] modified_seq_int = {0x0,0x2A,0x42,42,43,33}; 33 public static readonly int[] modified_seq_int = {0x0, 0x2A, 0x42, 42, 43, 33};
37 34
38 public static readonly string[] base_seq_str = {"0x0","0x2A","0x42"}; 35 public static readonly string[] base_seq_str = {"0x0", "0x2A", "0x42"};
39 public static readonly string[] append_seq_str = {"42","43","33"}; 36 public static readonly string[] append_seq_str = {"42", "43", "33"};
40 public static readonly string[] modified_seq_str = {"0x0","0x2A","0x42","42","43","33"}; 37 public static readonly string[] modified_seq_str = {"0x0", "0x2A", "0x42",
41 38 "42", "43", "33"};
42 public static readonly Eina.Stringshare[] base_seq_strshare = {"0x0","0x2A","0x42"}; 39
43 public static readonly Eina.Stringshare[] append_seq_strshare = {"42","43","33"}; 40 public static readonly Eina.Stringshare[] base_seq_strshare = {"0x0", "0x2A",
44 public static readonly Eina.Stringshare[] modified_seq_strshare = {"0x0","0x2A","0x42","42","43","33"}; 41 "0x42"};
42 public static readonly Eina.Stringshare[] append_seq_strshare = {"42", "43",
43 "33"};
44 public static readonly Eina.Stringshare[] modified_seq_strshare = {
45 "0x0", "0x2A", "0x42", "42", "43", "33"};
45 46
46 public static Dummy.Numberwrapper NW(int n) 47 public static Dummy.Numberwrapper NW(int n)
47 { 48 {
@@ -58,7 +59,7 @@ public static class BaseData
58 a.SetNumber(0x0); 59 a.SetNumber(0x0);
59 b.SetNumber(0x2A); 60 b.SetNumber(0x2A);
60 c.SetNumber(0x42); 61 c.SetNumber(0x42);
61 return new Dummy.Numberwrapper[]{a,b,c}; 62 return new Dummy.Numberwrapper[]{a, b, c};
62 } 63 }
63 64
64 public static Dummy.Numberwrapper[] AppendSeqObj() 65 public static Dummy.Numberwrapper[] AppendSeqObj()
@@ -69,7 +70,7 @@ public static class BaseData
69 a.SetNumber(42); 70 a.SetNumber(42);
70 b.SetNumber(43); 71 b.SetNumber(43);
71 c.SetNumber(33); 72 c.SetNumber(33);
72 return new Dummy.Numberwrapper[]{a,b,c}; 73 return new Dummy.Numberwrapper[]{a, b, c};
73 } 74 }
74 75
75 public static Dummy.Numberwrapper[] ModifiedSeqObj() 76 public static Dummy.Numberwrapper[] ModifiedSeqObj()
@@ -86,16 +87,14 @@ public static class BaseData
86 d.SetNumber(42); 87 d.SetNumber(42);
87 e.SetNumber(43); 88 e.SetNumber(43);
88 f.SetNumber(33); 89 f.SetNumber(33);
89 return new Dummy.Numberwrapper[]{a,b,c,d,e,f}; 90 return new Dummy.Numberwrapper[]{a, b, c, d, e, f};
90 } 91 }
91 92
92 public static void NumberwrapperSequenceAssertEqual( 93 public static void NumberwrapperSequenceAssertEqual(
93 Dummy.Numberwrapper[] a 94 Dummy.Numberwrapper[] a, Dummy.Numberwrapper[] b,
94 , Dummy.Numberwrapper[] b 95 [ CallerLineNumber ] int line = 0,
95 , [CallerLineNumber] int line = 0 96 [ CallerFilePath ] string file = null,
96 , [CallerFilePath] string file = null 97 [ CallerMemberName ] string member = null) {
97 , [CallerMemberName] string member = null)
98 {
99 Test.Assert(a.Length == b.Length, "Different lenght", line, file, member); 98 Test.Assert(a.Length == b.Length, "Different lenght", line, file, member);
100 for (int i = 0; i < a.Length; ++i) 99 for (int i = 0; i < a.Length; ++i)
101 { 100 {
@@ -201,7 +200,7 @@ class NativeInheritImpl : Dummy.TestObject
201 } 200 }
202 public bool binbuf_in_own_still_usable() 201 public bool binbuf_in_own_still_usable()
203 { 202 {
204 bool r = binbuf_in_own_binbuf.GetBytes().SequenceEqual(new byte[]{43,42,0x0,0x2A,0x42,33}); 203 bool r = binbuf_in_own_binbuf.GetBytes().SequenceEqual(new byte[]{43, 42, 0x0, 0x2A, 0x42, 33});
205 r = r && binbuf_in_own_binbuf.Own; 204 r = r && binbuf_in_own_binbuf.Own;
206 205
207 binbuf_in_own_binbuf.Dispose(); 206 binbuf_in_own_binbuf.Dispose();
diff --git a/src/tests/efl_mono/Promises.cs b/src/tests/efl_mono/Promises.cs
index f5d51e0..8b50e32 100644
--- a/src/tests/efl_mono/Promises.cs
+++ b/src/tests/efl_mono/Promises.cs
@@ -254,11 +254,12 @@ class TestPromises
254 Efl.Loop loop = Efl.App.AppMain; 254 Efl.Loop loop = Efl.App.AppMain;
255 Eina.Promise promise = new Eina.Promise(); 255 Eina.Promise promise = new Eina.Promise();
256#pragma warning disable 0219 256#pragma warning disable 0219
257 Eina.Future future = new Eina.Future(promise,(Eina.Value value) => { 257 Eina.Future future = new Eina.Future(promise, (Eina.Value value) =>
258 {
258 callbackCalled = true; 259 callbackCalled = true;
259 received_value = value; 260 received_value = value;
260 return value; 261 return value;
261 } ); 262 });
262#pragma warning restore 0219 263#pragma warning restore 0219
263 264
264 Eina.Value reference_value = new Eina.Value(Eina.ValueType.Int32); 265 Eina.Value reference_value = new Eina.Value(Eina.ValueType.Int32);