We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 208010a commit e61e919Copy full SHA for e61e919
test/native/tests/TestPtr.hx
@@ -213,6 +213,17 @@ class TestPtr extends Test
213
214
static function notProcAddress(module:String, func:String) return null;
215
216
+ // See: https://github.com/HaxeFoundation/hxcpp/issues/1028
217
+ public function testOfEmptyArray() {
218
+ var empty:Array<Dynamic> = [];
219
+ cpp.Pointer.ofArray( empty );
220
+ Assert.equals( 0, empty.length );
221
+
222
+ var emptyInt:Array<Int> = [];
223
+ cpp.Pointer.ofArray( emptyInt );
224
+ Assert.equals( 0, emptyInt.length );
225
+ }
226
227
public function testArrayAccess() {
228
var array = [ 0.0, 1.1, 2.2, 3.3 ];
229
var ptr = cpp.Pointer.arrayElem(array, 0);
0 commit comments