forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
19
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/TestBasic.hx
Normal file
19
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/TestBasic.hx
Normal file
@ -0,0 +1,19 @@
|
||||
class TestBasic extends haxe.unit.TestCase
|
||||
{
|
||||
public function new() super();
|
||||
|
||||
function testStartTelemetry(string:String)
|
||||
{
|
||||
var thread_id:Int = startTelemetry(true, true);
|
||||
assertTrue(thread_id>=0);
|
||||
}
|
||||
|
||||
function startTelemetry(with_profiler:Bool=true,
|
||||
with_allocations:Bool=true):Int
|
||||
{
|
||||
// Compile will fail without -D HXCPP_TELEMETRY
|
||||
return untyped __global__.__hxcpp_hxt_start_telemetry(with_profiler,
|
||||
with_allocations);
|
||||
}
|
||||
|
||||
}
|
13
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/TestMain.hx
Normal file
13
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/TestMain.hx
Normal file
@ -0,0 +1,13 @@
|
||||
package;
|
||||
|
||||
class TestMain {
|
||||
|
||||
static function main(){
|
||||
var r = new haxe.unit.TestRunner();
|
||||
r.add(new TestBasic());
|
||||
var t0 = haxe.Timer.stamp();
|
||||
var success = r.run();
|
||||
trace(" Time : " + (haxe.Timer.stamp()-t0)*1000 );
|
||||
Sys.exit(success ? 0 : 1);
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
-cpp bin
|
||||
-main TestMain
|
||||
-resource TestMain.hx
|
||||
-D HXCPP_TELEMETRY
|
||||
-D HXCPP_STACK_TRACE
|
||||
-cp ../unit
|
2
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/test.bat
Normal file
2
Kha/Backends/Kinc-hxcpp/khacpp/test/telemetry/test.bat
Normal file
@ -0,0 +1,2 @@
|
||||
haxe compile.hxml
|
||||
"bin/TestMain.exe"
|
Reference in New Issue
Block a user