From eea53dbb48227370ce2f6676cf91be71d078d719 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 14 Jun 2004 18:11:38 +0000 Subject: [PATCH] added profile test git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5983 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/java/profiletest_runme.java | 15 +++++++++++++++ Examples/test-suite/tcl/profiletest_runme.tcl | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 Examples/test-suite/java/profiletest_runme.java create mode 100644 Examples/test-suite/tcl/profiletest_runme.tcl diff --git a/Examples/test-suite/java/profiletest_runme.java b/Examples/test-suite/java/profiletest_runme.java new file mode 100644 index 000000000..f55001369 --- /dev/null +++ b/Examples/test-suite/java/profiletest_runme.java @@ -0,0 +1,15 @@ +import profiletest.*; + +public class profiletest_runme { + + System.loadLibrary("profiletest"); + + public static void main(String argv[]) { + + long a = profiletest.new_A(); + long b = profiletest.new_B(); + for (int i=0; i<1000000; i++) { + a = profiletest.B_fn(b, a); + } + } +} diff --git a/Examples/test-suite/tcl/profiletest_runme.tcl b/Examples/test-suite/tcl/profiletest_runme.tcl new file mode 100644 index 000000000..1662d1d59 --- /dev/null +++ b/Examples/test-suite/tcl/profiletest_runme.tcl @@ -0,0 +1,9 @@ +catch { load ./profiletest.so profiletest} +catch { load ./profiletest.dll profiletest} ;# Windows + +set a [new_A] +set b [new_B] + +for {set i 0} {$i < 1000000} {incr i 1} { + set a [B_fn $b $a] +} \ No newline at end of file