Browse Source

[tests] hlc NativeArray Bytes comparison (#11614)

Yuxiao Mao 1 year ago
parent
commit
8d0f87d2ca
1 changed files with 19 additions and 0 deletions
  1. 19 0
      tests/unit/src/unit/issues/Issue11468.hx

+ 19 - 0
tests/unit/src/unit/issues/Issue11468.hx

@@ -0,0 +1,19 @@
+package unit.issues;
+import unit.Test;
+
+class Issue11468 extends Test {
+
+	#if hl
+	function test() {
+		var m = new Map<Int,hl.NativeArray<Int>>();
+		t(m.get(0) == null);
+		var arr = new hl.NativeArray<Int>(1);
+		f(arr == null);
+
+		var b1 = new hl.Bytes(0);
+		t(b1 == null);
+		var b2 = new hl.Bytes(1);
+		f(b2 == null);
+	}
+	#end
+}