Skip to content

Commit

Permalink
utest for telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Jun 25, 2024
1 parent f3fc4ee commit 41674a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
11 changes: 6 additions & 5 deletions test/telemetry/TestBasic.hx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
class TestBasic extends haxe.unit.TestCase
{
public function new() super();
import utest.Test;
import utest.Assert;

function testStartTelemetry(string:String)
class TestBasic extends Test
{
function testStartTelemetry()
{
var thread_id:Int = startTelemetry(true, true);
assertTrue(thread_id>=0);
Assert.isTrue(thread_id>=0);
}

function startTelemetry(with_profiler:Bool=true,
Expand Down
7 changes: 1 addition & 6 deletions test/telemetry/TestMain.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ 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);
utest.UTest.run([ new TestBasic() ]);
}
}
9 changes: 5 additions & 4 deletions test/telemetry/compile.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-cpp bin
-main TestMain
-resource TestMain.hx
-m TestMain
-r TestMain.hx
-D HXCPP_TELEMETRY
-D HXCPP_STACK_TRACE
-cp ../unit
-p ../unit
-L utest
--cpp bin

0 comments on commit 41674a6

Please sign in to comment.