Skip to content

Commit

Permalink
Issue #6 Fixed enums unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeandersson committed Jun 30, 2016
1 parent b72af23 commit ac98e7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions Examples/test-suite/matlab/enums_runme.m
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import .*
enums
enums.bar2(1);
enums.bar3(1);
enums.bar1(1);

enums.bar2(1)
enums.bar3(1)
enums.bar1(1)

if (enums.cvar.enumInstance ~= 2)
if (enums.enumInstance ~= 2)
error
end

if (enums.cvar.Slap ~= 10)
if (enums.Slap ~= 10)
error
end

if (enums.cvar.Mine ~= 11)
if (enums.Mine ~= 11)
error
end

if (enums.cvar.Thigh ~= 12)
if (enums.Thigh ~= 12)
error
end

2 changes: 1 addition & 1 deletion Source/Modules/matlab.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ int MATLAB::constantWrapper(Node *n) {
if ((tm = Swig_typemap_lookup("constcode", n, name, 0))) {
Replaceall(tm, "$source", value);
Replaceall(tm, "$target", name);
Replaceall(tm, "$value", cppvalue ? cppvalue : value);
Replaceall(tm, "$value", CPlusPlus && cppvalue ? cppvalue : value);
Replaceall(tm, "$nsname", symname);
con_id = toConstant(symname,tm);
} else {
Expand Down

0 comments on commit ac98e7a

Please sign in to comment.