Browse Source

Disable most nativeGen tests for cpp

hughsando 10 years ago
parent
commit
bf1fef4deb

+ 1 - 1
tests/unit/src/unit/issues/Issue2304.hx

@@ -24,7 +24,7 @@ private class TestImpl extends BaseTest implements ITest
 	}
 }
 
-@:nativeGen
+#if !cpp @:nativeGen #end
 private class BaseTest
 {
 	public function new()

+ 1 - 1
tests/unit/src/unit/issues/Issue2380.hx

@@ -9,7 +9,7 @@ class Issue2380 extends unit.Test
 	}
 }
 
-@:nativeGen private class SomeCls
+#if !cpp @:nativeGen #end private class SomeCls
 {
     public function new():Void {}
     @:keep public function test(v) return v == null;

+ 1 - 1
tests/unit/src/unit/issues/Issue2570.hx

@@ -9,7 +9,7 @@ class Issue2570 extends unit.Test
 	}
 }
 
-@:nativeGen private class A
+#if !cpp @:nativeGen #end private class A
 {
 	public function new()
 	{

+ 10 - 0
tests/unit/src/unit/issues/Issue3217.hx

@@ -4,12 +4,22 @@ class Issue3217 extends Test
 {
 	public function test()
 	{
+      #if (cpp && !cppia)
+		var t:NativeClassStruct = null;
+      #else
 		var t:{ test:Int } = new NativeClass();
+      #end
 		t.test = 10;
 		eq(t.test,10);
 	}
 }
 
+#if (cpp && !cppia)
+@:native("cpp::Struct< ::unit::issues::_Issue3217::NativeClass>")
+@:include("unit/issues/_Issue3217/NativeClass.h")
+private extern class NativeClassStruct extends NativeClass { }
+#end
+
 @:nativeGen
 private class NativeClass
 {

+ 1 - 1
tests/unit/src/unit/issues/Issue3248.hx

@@ -11,7 +11,7 @@ class Issue3248 extends Test {
 
 private class Foo {}
 
-@:nativeGen private class Bar<T>
+#if !cpp @:nativeGen #end private class Bar<T>
 {
 	public var arr:Vector<T>;
 	public function new(arr)

+ 1 - 1
tests/unit/src/unit/issues/Issue3575.hx

@@ -8,7 +8,7 @@ class Issue3575 extends Test {
 }
 
 
-@:nativeGen private class Base
+#if !cpp @:nativeGen #end private class Base
 {
 #if (cs || java) @:overload #end
 	public function getName()

+ 1 - 1
tests/unit/src/unit/issues/Issue4000.hx

@@ -21,7 +21,7 @@ class Issue4000 extends Test
 	}
 }
 
-@:nativeGen private class NativeGen
+#if !cpp @:nativeGen #end private class NativeGen
 {
 	public function new()
 	{