Browse Source

[tests] add test for #11202

Rudy Ges 2 years ago
parent
commit
5e70abef96

+ 14 - 0
tests/misc/projects/eventLoop/Main2.hx

@@ -0,0 +1,14 @@
+class Main2 {
+	static function main() {
+		var event : haxe.MainLoop.MainEvent = null;
+		var count = 0;
+		event = haxe.MainLoop.add(function() {
+			trace(count++);
+			if( count == 10 ) {
+				event.stop();
+				trace(haxe.MainLoop.hasEvents());
+			}
+		});
+	}
+
+}

+ 3 - 0
tests/misc/projects/eventLoop/compile2.hxml

@@ -0,0 +1,3 @@
+--main Main2
+--dce full
+--interp