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
This commit is contained in:
William S Fulton 2011-03-26 15:28:31 +00:00
commit b13ec94386
12 changed files with 239 additions and 19 deletions

View file

@ -416,6 +416,28 @@ public class enum_thorough_runme {
if (enum_thorough.repeatTest(repeat.llast).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
if (enum_thorough.repeatTest(repeat.end).swigValue() != 3) throw new RuntimeException("repeatTest 6 failed");
}
// different types
{
if (enum_thorough.differentTypesTest(DifferentTypes.typeint).swigValue() != 10) throw new RuntimeException("differentTypes 1 failed");
if (enum_thorough.differentTypesTest(DifferentTypes.typeboolfalse).swigValue() != 0) throw new RuntimeException("differentTypes 2 failed");
if (enum_thorough.differentTypesTest(DifferentTypes.typebooltrue).swigValue() != 1) throw new RuntimeException("differentTypes 3 failed");
if (enum_thorough.differentTypesTest(DifferentTypes.typebooltwo).swigValue() != 2) throw new RuntimeException("differentTypes 4 failed");
if (enum_thorough.differentTypesTest(DifferentTypes.typechar).swigValue() != 'C') throw new RuntimeException("differentTypes 5 failed");
if (enum_thorough.differentTypesTest(DifferentTypes.typedefaultint).swigValue() != 'D') throw new RuntimeException("differentTypes 6 failed");
int global_enum = enum_thorough.global_typeint;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 10) throw new RuntimeException("global differentTypes 1 failed");
global_enum = enum_thorough.global_typeboolfalse;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 0) throw new RuntimeException("global differentTypes 2 failed");
global_enum = enum_thorough.global_typebooltrue;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 1) throw new RuntimeException("global differentTypes 3 failed");
global_enum = enum_thorough.global_typebooltwo;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 2) throw new RuntimeException("global differentTypes 4 failed");
global_enum = enum_thorough.global_typechar;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 'C') throw new RuntimeException("global differentTypes 5 failed");
global_enum = enum_thorough.global_typedefaultint;
if (enum_thorough.globalDifferentTypesTest(global_enum) != 'D') throw new RuntimeException("global differentTypes 6 failed");
}
}
}