fix code swig ext test