Merge branch 'jiulongw-master'
* jiulongw-master: Fix go wrapper compilation error Fix missing semicolon in golang wrapper Fix extra quote escape in golang Fix #define error when value contains char in compound expression Add more test case for char const expression in enum Revert "Add enum test cases with const char in compound expression" Add runtime tests for char in compound expression patch Add enum test cases with const char in compound expression Fix enum error when value contains char in compound expression
This commit is contained in:
commit
f89b8836dd
6 changed files with 82 additions and 42 deletions
|
|
@ -405,6 +405,10 @@ public class runme {
|
|||
if (enum_thorough_typesafe.repeatTest(repeat.llast).swigValue != 3) throw new Exception("repeatTest 5 failed");
|
||||
if (enum_thorough_typesafe.repeatTest(repeat.end).swigValue != 3) throw new Exception("repeatTest 6 failed");
|
||||
}
|
||||
{
|
||||
if (enum_thorough_typesafe.enumWithMacroTest(enumWithMacro.ABCD).swigValue != (('A' << 24) | ('B' << 16) | ('C' << 8) | 'D')) throw new Exception("enumWithMacroTest 1 failed");
|
||||
if (enum_thorough_typesafe.enumWithMacroTest(enumWithMacro.ABCD2).swigValue != enum_thorough_typesafe.enumWithMacroTest(enumWithMacro.ABCD).swigValue) throw new Exception("enumWithMacroTest 2 failed");
|
||||
}
|
||||
// different types
|
||||
{
|
||||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typeint).swigValue != 10) throw new Exception("differentTypes 1 failed");
|
||||
|
|
@ -413,6 +417,8 @@ public class runme {
|
|||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typeboolfalse).swigValue != 0) throw new Exception("differentTypes 4 failed");
|
||||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typechar).swigValue != (int)'C') throw new Exception("differentTypes 5 failed");
|
||||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typedefaultint).swigValue != (int)'D') throw new Exception("differentTypes 6 failed");
|
||||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typecharcompound).swigValue != (int)'A' + 1) throw new Exception("differentTypes 7 failed");
|
||||
if (enum_thorough_typesafe.differentTypesTest(DifferentTypes.typecharcompound2).swigValue != (int)'B' << 2) throw new Exception("differentTypes 8 failed");
|
||||
|
||||
int global_enum = enum_thorough_typesafe.global_typeint;
|
||||
if (enum_thorough_typesafe.globalDifferentTypesTest(global_enum) != 10) throw new Exception("global differentTypes 1 failed");
|
||||
|
|
@ -426,6 +432,10 @@ public class runme {
|
|||
if (enum_thorough_typesafe.globalDifferentTypesTest(global_enum) != 'C') throw new Exception("global differentTypes 5 failed");
|
||||
global_enum = enum_thorough_typesafe.global_typedefaultint;
|
||||
if (enum_thorough_typesafe.globalDifferentTypesTest(global_enum) != 'D') throw new Exception("global differentTypes 6 failed");
|
||||
global_enum = enum_thorough_typesafe.global_typecharcompound;
|
||||
if (enum_thorough_typesafe.globalDifferentTypesTest(global_enum) != (int)'A' + 1) throw new Exception("global differentTypes 7 failed");
|
||||
global_enum = enum_thorough_typesafe.global_typecharcompound2;
|
||||
if (enum_thorough_typesafe.globalDifferentTypesTest(global_enum) != (int)'B' << 2) throw new Exception("global differentTypes 8 failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue