swig/Examples/test-suite/javascript/rename4_runme.js
Karl Wette f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00

68 lines
1.3 KiB
JavaScript

var rename = require("rename4");
function part1() {
var xyz = new rename.XYZInt();
notxyz = new rename.NotXYZInt();
xyz.opIntPtrA();
xyz.opIntPtrB();
xyz.opAnother2();
xyz.opT2();
xyz.tMethod2(0);
xyz.tMethodNotXYZ2(notxyz);
xyz.opNotXYZ2();
xyz.opXYZ2();
}
function part2() {
var xyz = new rename.XYZDouble();
var notxyz = new rename.NotXYZDouble();
xyz.opIntPtrA();
xyz.opIntPtrB();
xyz.opAnother1();
xyz.opT1();
xyz.tMethod1(0);
xyz.tMethodNotXYZ1(notxyz);
xyz.opNotXYZ1();
xyz.opXYZ1();
}
function part3(){
var xyz = new rename.XYZKlass();
var notxyz = new rename.NotXYZKlass();
xyz.opIntPtrA();
xyz.opIntPtrB();
xyz.opAnother3();
xyz.opT3();
xyz.tMethod3(new rename.Klass());
xyz.tMethodNotXYZ3(notxyz);
xyz.opNotXYZ3();
xyz.opXYZ3();
}
function part4() {
var xyz = new rename.XYZEnu();
var notxyz = new rename.NotXYZEnu();
xyz.opIntPtrA();
xyz.opIntPtrB();
xyz.opAnother4();
xyz.opT4();
xyz.tMethod4(rename.En1);
xyz.tMethodNotXYZ4(notxyz);
xyz.opNotXYZ4();
xyz.opXYZ4();
}
function part5() {
var abc = new rename.ABC();
abc.methodABC(abc);
var k = new rename.Klass();
abc.methodKlass(k);
var a = abc.opABC();
k = abc.opKlass();
}
part1();
part2();
part3();
part4();
part5();