call the sanity_check function to check the C++ operators are implemented correctly

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8272 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-01-07 01:36:36 +00:00
commit 49352e13b1
2 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,9 @@ import("operator_overload") -- import lib
for k,v in pairs(operator_overload) do _G[k]=v end -- move to global
-- first check all the operators are implemented correctly from pure C++ code
Op_sanity_check()
-- catching undefined variables
setmetatable(getfenv(),{__index=function (t,i) error("undefined global variable `"..i.."'",2) end})

View file

@ -5,6 +5,9 @@ use operator_overload;
pass("loaded");
# first check all the operators are implemented correctly from pure C++ code
operator_overloadc::Op_sanity_check();
my $op = operator_overload::Op->new();
isa_ok($op, "operator_overload::Op");