summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Eo.cs
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-01-21 07:00:44 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2020-01-21 07:00:44 +0900
commit292f4bc0da8bf2432c344f03797f70b89267db26 (patch)
tree46d6fe862cf8e449fcd769a6ccd08e1dcef9c6ce /src/tests/efl_mono/Eo.cs
parent55ec2dc89e9b38ad52c5e8b3d8ac42c8e906bba6 (diff)
Revert "csharp: Property Indexer implementation"
Summary: This reverts commit 0954e501fd4008c40b3848de1f2c91bcd53b2f71. According to Framework Design Guidelines of MS, most of indexed properties are not recommended in EFL#. (see, https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/property) It is better to leave properties which have a key as methods. Reviewers: woohyun, felipealmeida Reviewed By: woohyun Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11114
Diffstat (limited to 'src/tests/efl_mono/Eo.cs')
-rw-r--r--src/tests/efl_mono/Eo.cs62
1 files changed, 8 insertions, 54 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index af40bf12d8..7c580480ad 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -402,15 +402,15 @@ class TestCsharpProperties
402 obj.Dispose(); 402 obj.Dispose();
403 } 403 }
404 404
405 // public static void test_setter_only() 405 public static void test_setter_only()
406 // { 406 {
407 // var obj = new Dummy.TestObject(); 407 var obj = new Dummy.TestObject();
408 // int val = -1984; 408 int val = -1984;
409 409
410 // obj.SetterOnly = val; 410 obj.SetterOnly = val;
411 // Test.AssertEquals(val, obj.GetSetterOnly()); 411 Test.AssertEquals(val, obj.GetSetterOnly());
412 // obj.Dispose(); 412 obj.Dispose();
413 // } 413 }
414 414
415 public static void test_class_property() 415 public static void test_class_property()
416 { 416 {
@@ -436,52 +436,6 @@ class TestCsharpProperties
436 Test.AssertEquals(ret, (1, 2)); 436 Test.AssertEquals(ret, (1, 2));
437 obj.Dispose(); 437 obj.Dispose();
438 } 438 }
439
440 public static void test_csharp_keyed_multi_valued_prop()
441 {
442 var obj = new Dummy.TestObject();
443 obj.KeyedMultiValuedProp[100] = (1, 2);
444 Test.AssertEquals(obj.KeyedMultiValuedProp[100], (1, 2));
445 obj.Dispose();
446 }
447
448 public static void test_csharp_multi_keyed_multi_valued_prop()
449 {
450 var obj = new Dummy.TestObject();
451 obj.MultiKeyedMultiValuedProp[(100, 101)] = (1, 2);
452 Test.AssertEquals(obj.MultiKeyedMultiValuedProp[(100, 101)], (1, 2));
453 obj.Dispose();
454 }
455
456 public static void test_csharp_multi_prop()
457 {
458 var obj = new Dummy.TestObject();
459 obj.MultiKeyedMultiValuedProp[(100, 101)] = (1, 2);
460 obj.KeyedMultiValuedProp[100] = (1, 2);
461 Test.AssertEquals(obj.KeyedMultiValuedProp[100],
462 obj.MultiKeyedMultiValuedProp[(100, 101)]);
463 int a1, b1, a2, b2;
464#if __MonoCS__
465 (int a, int b) t1 = obj.MultiKeyedMultiValuedProp[(100, 101)];
466 (a1, b1) = (t1.Item1, t1.Item2);
467 (int a, int b) t2 = obj.KeyedMultiValuedProp[100];
468 (a2, b2) = (t2.Item1, t2.Item2);
469#else
470 (a1, b1) = obj.MultiKeyedMultiValuedProp[(100, 101)];
471 (a2, b2) = obj.KeyedMultiValuedProp[100];
472#endif
473 Test.AssertEquals(a1, a2);
474 Test.AssertEquals(b1, b2);
475 var i = (100, 101);
476 var j = 100;
477 Test.AssertEquals(obj.KeyedMultiValuedProp[j],
478 obj.MultiKeyedMultiValuedProp[i]);
479 obj.MultiKeyedMultiValuedProp[i] = (1, 3);
480 obj.KeyedMultiValuedProp[j] = obj.MultiKeyedMultiValuedProp[i];
481 Test.AssertEquals(obj.KeyedMultiValuedProp[j],
482 obj.MultiKeyedMultiValuedProp[i]);
483
484 }
485} 439}
486 440
487class TestEoGrandChildrenFinalize 441class TestEoGrandChildrenFinalize