Quellcode durchsuchen

add test (closes HaxeFoundation/hxcpp#352)

Simon Krajewski vor 9 Jahren
Ursprung
Commit
adced232ae
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  1. 12 0
      tests/unit/src/unit/hxcpp_issues/Issue352.hx

+ 12 - 0
tests/unit/src/unit/hxcpp_issues/Issue352.hx

@@ -0,0 +1,12 @@
+package unit.hxcpp_issues;
+
+class Issue352 extends Test {
+	@:keep
+	static function onSample( buf : cpp.Pointer<cpp.Float32>, len : Int ) {
+		var data : haxe.io.BytesData = [];
+		cpp.NativeArray.setUnmanagedData(data, buf.reinterpret(), len<<2);
+		foo( haxe.io.Float32Array.fromBytes(haxe.io.Bytes.ofData(data)) );
+	}
+
+	static function foo(d) { }
+}