efl/src/bindings/mono/eina_mono
Lucas Cavalcante de Sousa 4797602e84 efl_mono: Use architecture independent ECANCELED
Summary:
`efl_mono` was assuming ECANCELED as in Linux, which made some tests
fail.

`test_simple_futere_cancel` and `test_cancel_after_resolve` checks if
the returned error code is `ECANCELED` but `Eina.Error.ECANCELED` was
base on Linux `ECANCELED` which is diferent from OSX causing:
```
[ ERROR       ] AssertionException: /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:138 (test_simple_future_cancel) Left hand side "Eina.Error(89)", right hand side "Eina.Error(125)"
at Test.AssertEquals[T](T lhs, T rhs, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 73
at TestSuite.TestPromises.test_simple_future_cancel() in /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:line 138
[        FAIL ] TestPromises.test_simple_future_cancel
```
```
[ ERROR       ] AssertionException: /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:256 (test_cancel_after_resolve) Left hand side "Eina.Error(89)", right hand side "Eina.Error(125)"
at Test.AssertEquals[T](T lhs, T rhs, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 73
at TestSuite.TestPromises.test_cancel_after_resolve() in /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:line 256
[        FAIL ] TestPromises.test_cancel_after_resolve
```

And `iwraper.cs:WrapAssync` was only considering Linux `ECANCELED` thus causing
a rise of an `Efl.FutureException: Future failed` instead of the expected
`TaskCanceledException` making fail at `TestEoAsyncMethods.test_async_cancel`:
```
[ RUN         ] TestEoAsyncMethods.test_async_cancel
[ ERROR       ] AssertionException: Assertion failed: /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:175 (test_async_cancel) AggregateException must have been TaskCanceledException
   at Test.Assert(Boolean res, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 53
   at TestSuite.TestEoAsyncMethods.<>c.<test_async_cancel>b__1_0(Exception x) in /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:line 175
   at System.AggregateException.Handle(Func`2 predicate)
   at TestSuite.TestEoAsyncMethods.test_async_cancel() in /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:line 171
[        FAIL ] TestEoAsyncMethods.test_async_cancel
```

Depends on D12156

Test Plan:
Compare with master and note that with this diff all tests pass.
- Configure as especified by Enlightenment man page + `-Dbindigns=mono -Ddotnet=true`:
```
meson -Dsystemd=false -Dv4l2=false -Davahi=false -Deeze=false -Dx11=false -Dopengl=full -Dcocoa=true -Dnls=false -Demotion-loaders-disabler=gstreamer1,libvlc,xine -Decore-imf-loaders-disabler=scim,ibus -Dbindigns=cxx,mono -Ddotnet=true build
```
- Build normally
- Test `efl-mono-suite`

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: ProhtMeyhet, cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12157
2020-11-25 10:44:41 -03:00
..
eina_accessor.cs csharp: Fix passing acessor with ownership 2019-12-18 10:40:53 -03:00
eina_array.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_binbuf.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_common.cs C#: Update C# code-generation to use a new ICustomMarshaler in some string usages that were leaking 2020-03-23 14:18:16 -03:00
eina_config.cs csharp: Add licensing information. 2019-10-24 10:10:56 -03:00
eina_container_common.cs csharp: cleanup concrete class 2020-01-23 07:30:14 +09:00
eina_environment.cs csharp: apply same form of "Since EFL" to all manual bindings .cs files 2019-12-17 20:18:54 +09:00
eina_error.cs efl_mono: Use architecture independent ECANCELED 2020-11-25 10:44:41 -03:00
eina_hash.cs eina_mono: make internal classes internal 2019-12-23 15:02:31 -03:00
eina_inarray.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_inlist.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_iterator.cs eina_mono: make internal classes internal 2019-12-23 15:02:31 -03:00
eina_list.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_log.cs csharp: Changing visibility of nested class/struct 2019-11-04 14:53:54 -03:00
eina_promises.cs c#: Checking null for parameters. 2019-12-26 14:46:16 -03:00
eina_slice.cs csharp: rename ExtensionMethods 2020-01-06 19:08:44 +09:00
eina_strbuf.cs eina_mono: remove exceptions in unexpected locations 2019-10-28 20:33:47 -03:00
eina_stringshare.cs Fix typos - (Part #3) 2020-07-06 10:52:51 +02:00
eina_value.cs efl_mono: Create insert list/array c# wrapper for eina_value. 2020-02-13 15:26:50 -03:00
meson.build csharp: Fix running headless tests in dotnet 2019-11-07 22:46:15 -03:00