diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2011-03-26 15:28:31 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2011-03-26 15:28:31 +0000 |
commit | b13ec94386c8055e9dcc0fb6338b2e3e1e4048d4 (patch) | |
tree | d2a80e3e742305f7e94d5a6601c73aca3955daf4 /Examples/test-suite/csharp/enum_thorough_simple_runme.cs | |
parent | ae6aef5d8f7831cc68326f5934c861f08eb7767c (diff) | |
download | swig-b13ec94386c8055e9dcc0fb6338b2e3e1e4048d4.tar.gz |
SF bug #3195112 - fix wrapping of enums that are type char
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/csharp/enum_thorough_simple_runme.cs')
-rw-r--r-- | Examples/test-suite/csharp/enum_thorough_simple_runme.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/csharp/enum_thorough_simple_runme.cs b/Examples/test-suite/csharp/enum_thorough_simple_runme.cs index d5bba1b7d..0c22d8e3f 100644 --- a/Examples/test-suite/csharp/enum_thorough_simple_runme.cs +++ b/Examples/test-suite/csharp/enum_thorough_simple_runme.cs @@ -405,6 +405,28 @@ public class runme { if (enum_thorough_simple.repeatTest(enum_thorough_simple.llast) != 3) throw new Exception("repeatTest 5 failed"); if (enum_thorough_simple.repeatTest(enum_thorough_simple.end) != 3) throw new Exception("repeatTest 6 failed"); } + // different types + { + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typeint) != 10) throw new Exception("differentTypes 1 failed"); + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typeboolfalse) != 0) throw new Exception("differentTypes 2 failed"); + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typebooltrue) != 1) throw new Exception("differentTypes 3 failed"); + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typebooltwo) != 2) throw new Exception("differentTypes 4 failed"); + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typechar) != 'C') throw new Exception("differentTypes 5 failed"); + if (enum_thorough_simple.differentTypesTest(enum_thorough_simple.typedefaultint) != 'D') throw new Exception("differentTypes 6 failed"); + + int global_enum = enum_thorough_simple.global_typeint; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 10) throw new Exception("global differentTypes 1 failed"); + global_enum = enum_thorough_simple.global_typeboolfalse; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 0) throw new Exception("global differentTypes 2 failed"); + global_enum = enum_thorough_simple.global_typebooltrue; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 1) throw new Exception("global differentTypes 3 failed"); + global_enum = enum_thorough_simple.global_typebooltwo; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 2) throw new Exception("global differentTypes 4 failed"); + global_enum = enum_thorough_simple.global_typechar; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 'C') throw new Exception("global differentTypes 5 failed"); + global_enum = enum_thorough_simple.global_typedefaultint; + if (enum_thorough_simple.globalDifferentTypesTest(global_enum) != 'D') throw new Exception("global differentTypes 6 failed"); + } } } |