swig/Examples/test-suite/c/enum_rename_runme.c
Vadim Zeitlin f4ee8e5369 Fix names of enums and their elements
Use the containing class name as prefix, and add the name of the enum
itself to the prefix for the scoped enums, instead of doing something
strange and semi-random that we did before, with prefixes including the
namespace (which should never be the case without "nspace" feature), but
not the scoped enum.

This also fixes renaming of enum elements, as a side effect, which
didn't work before, add run test for enum_rename unit test to prove it.
2021-11-07 02:14:16 +01:00

12 lines
192 B
C

#include <assert.h>
#include "enum_rename/enum_rename_wrap.h"
int main() {
assert(M_Jan == 0);
assert(May == 1);
assert(M_Dec == 2);
assert(S_Can == 1);
assert(S_Must == 2);
}