diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2022-05-30 19:43:04 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2022-05-30 19:43:04 +0100 |
commit | 954f29b032dfc0ef04e4b0ef0871b04a30068b6b (patch) | |
tree | b7b2427925e9443dacb12301cf3b1090d6b505ce /Examples/test-suite/csharp | |
parent | 62e0685df61bd636cb101eb58a27e0e14074b0c2 (diff) | |
download | swig-954f29b032dfc0ef04e4b0ef0871b04a30068b6b.tar.gz |
Add special variable imfuncname expansion for C# and D
Same functionality as Java
Diffstat (limited to 'Examples/test-suite/csharp')
-rw-r--r-- | Examples/test-suite/csharp/csharp_typemaps_runme.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/test-suite/csharp/csharp_typemaps_runme.cs b/Examples/test-suite/csharp/csharp_typemaps_runme.cs index 846644f09..a9119a0c3 100644 --- a/Examples/test-suite/csharp/csharp_typemaps_runme.cs +++ b/Examples/test-suite/csharp/csharp_typemaps_runme.cs @@ -107,6 +107,22 @@ public class TestThread { Console.Error.WriteLine("Test failed (thread " + threadId + "): " + e.Message); Failed = true; } + + // $imfuncname substitution + ProxyA pa = new ProxyA(); + if (pa.imfuncname_test() != 123) + throw new ApplicationException("imfuncname_test is not 123"); + if (ProxyA.imfuncname_static_test() != 234) + throw new ApplicationException("imfuncname_test is not 234"); + if (csharp_typemaps.imfuncname_global_test() != 345) + throw new ApplicationException("imfuncname_test is not 345"); + + pa.variab = 1000; + if (pa.variab != 1000 + 111 + 222) + throw new ApplicationException("pa.variab is not 1333"); + csharp_typemaps.global_variab = 1000; + if (csharp_typemaps.global_variab != 1000 + 333 + 444) + throw new ApplicationException("csharp_typemaps.variab is not 1777"); } } |