Bläddra i källkod

They are everywhere...

Rudy Ges 1 år sedan
förälder
incheckning
a79af0fef8

+ 2 - 2
std/haxe/ds/IntMap.hx

@@ -58,7 +58,7 @@ extern class IntMap<T> implements haxe.Constraints.IMap<Int, T> {
 	/**
 		See `Map.keys`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function keys():Iterator<Int>;
@@ -66,7 +66,7 @@ extern class IntMap<T> implements haxe.Constraints.IMap<Int, T> {
 	/**
 		See `Map.iterator`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function iterator():Iterator<T>;

+ 2 - 2
std/haxe/ds/ObjectMap.hx

@@ -61,7 +61,7 @@ extern class ObjectMap<K:{}, V> implements haxe.Constraints.IMap<K, V> {
 	/**
 		See `Map.keys`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function keys():Iterator<K>;
@@ -69,7 +69,7 @@ extern class ObjectMap<K:{}, V> implements haxe.Constraints.IMap<K, V> {
 	/**
 		See `Map.iterator`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function iterator():Iterator<V>;

+ 2 - 2
std/haxe/ds/StringMap.hx

@@ -58,7 +58,7 @@ extern class StringMap<T> implements haxe.Constraints.IMap<String, T> {
 	/**
 		See `Map.keys`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function keys():Iterator<String>;
@@ -66,7 +66,7 @@ extern class StringMap<T> implements haxe.Constraints.IMap<String, T> {
 	/**
 		See `Map.iterator`
 
-		(cs, java) Implementation detail: Do not `set()` any new value while
+		(java) Implementation detail: Do not `set()` any new value while
 		iterating, as it may cause a resize, which will break iteration.
 	**/
 	function iterator():Iterator<T>;

+ 1 - 1
tests/README.md

@@ -9,7 +9,7 @@ We have a number of test suites, which are placed in their own folders in this d
 It is possible to run it in local machines too:
 
  1. Change to this directory.
- 2. Define the test target by `export TEST=$TARGET` (or `set "TEST=$TARGET"` on Windows), where `$TARGET` should be a comma-seperated list of targets, e.g. `neko,macro`. Possible targets are `macro`, `neko`, `js`, `lua`, `php`, `cpp`, `cppia`, `flash`, `java`, `jvm`, `cs`, `python`, and `hl`.
+ 2. Define the test target by `export TEST=$TARGET` (or `set "TEST=$TARGET"` on Windows), where `$TARGET` should be a comma-seperated list of targets, e.g. `neko,macro`. Possible targets are `macro`, `neko`, `js`, `lua`, `php`, `cpp`, `cppia`, `flash`, `jvm`, `python`, and `hl`.
  3. Run the script: `haxe RunCi.hxml`.
 
 Note that the script will try to look for test dependencies and install them if they are not found. Look at the `getXXXDependencies` functions for the details.

+ 1 - 1
tests/misc/README.md

@@ -24,7 +24,7 @@ To run tests only for a single project use the following command: `haxe -D MISC_
 
 ### Running target specific projects locally
 
-Tests specific to some targets (python, cs) reside in their own separate folder (respectively `tests/misc/python` and `tests/misc/cs`).
+Tests specific to some targets (python, hl) reside in their own separate folder (respectively `tests/misc/python` and `tests/misc/hl`).
 
 Chdir to `tests/misc/{target}` and run `haxe run.hxml` to run these tests.
 

+ 0 - 2
tests/misc/eventLoop/all.hxml

@@ -14,6 +14,4 @@
 --next
 -java java
 --next
--cs cs
---next
 -cpp cpp

+ 0 - 3
tests/misc/weakmap/compile-cs.hxml

@@ -1,3 +0,0 @@
---main TestWeakMap
--cs cs
---debug

+ 0 - 10
tests/unit/compile-cs-unsafe.hxml

@@ -1,10 +0,0 @@
-#cs native build
--cmd "haxelib run hxcs native_cs/hxcs_build.txt"
-
---next
-
-compile-each.hxml
---main unit.TestMain
--D unsafe
--cs bin/cs_unsafe
---net-lib native_cs/bin/native_cs.dll

+ 0 - 9
tests/unit/compile-cs.hxml

@@ -1,9 +0,0 @@
-#cs native build
--cmd "haxelib run hxcs native_cs/hxcs_build.txt"
-
---next
-
-compile-each.hxml
---main unit.TestMain
--cs bin/cs
---net-lib native_cs/bin/native_cs.dll

+ 0 - 10
tests/unit/compile-java.hxml

@@ -1,10 +0,0 @@
-compile-java-native.hxml
-
---next
-
-compile-each.hxml
---main unit.TestMain
--java bin/java
---java-lib native_java/native.jar
---java-lib java_drivers/mysql-connector-java-5.1.32-bin.jar
---java-lib java_drivers/sqlite-jdbc-3.7.2.jar

+ 1 - 3
tests/unit/compile.hxml

@@ -19,8 +19,6 @@ compile-java-runner.hxml
 --next compile-neko.hxml
 --next compile-php.hxml
 --next compile-cpp.hxml
---next compile-java.hxml
---next compile-cs.hxml
+--next compile-jvm.hxml
 --next compile-python.hxml
---next compile-cs-unsafe.hxml
 --next compile-macro.hxml

+ 0 - 28
tests/unit/native_cs/hxcs_build.txt

@@ -1,28 +0,0 @@
-./
-begin modules
-M haxe.test.OverloadInterface1
-C haxe.test.OverloadInterface1
-M haxe.test.OverloadInterface2
-C haxe.test.OverloadInterface2
-M haxe.test.MyClass
-C haxe.test.MyClass
-M haxe.test.TEnum
-E haxe.test.TEnum
-M haxe.test.TEnumWithValue
-E haxe.test.TEnumWithValue
-M haxe.test.Base
-C haxe.test.Base
-M haxe.test.Generic1
-C haxe.test.Generic1
-M haxe.test.GenericHelper
-C haxe.test.GenericHelper
-M haxe.test.StaticAndInstanceClash
-C haxe.test.StaticAndInstanceClash
-M haxe.test.AttrWithNullType
-C haxe.test.AttrWithNullType
-M NoPackage
-C NoPackage
-end modules
-begin defines
-dll
-end defines

+ 0 - 21
tests/unit/native_cs/src/NoPackage.cs

@@ -1,21 +0,0 @@
-public class NoPackage
-{
-	public NoPackInner b;
-	public bool isWorking;
-
-	public NoPackage()
-	{
-		isWorking = true;
-		b = new NoPackInner();
-	}
-
-	public class NoPackInner
-	{
-		public bool isReallyWorking;
-
-		public NoPackInner()
-		{
-			isReallyWorking = true;
-		}
-	}
-}

+ 0 - 17
tests/unit/native_cs/src/haxe/test/AttrWithNullType.cs

@@ -1,17 +0,0 @@
-using System;
-
-namespace haxe.test {
-	[MyAttr(null)]
-	public class AttrWithNullType {}
-
-	[MyAttr(typeof(AttrWithNullType))]
-	public class AttrWithNonNullType {}
-
-	public class MyAttrAttribute : Attribute {
-		public bool check;
-
-		public MyAttrAttribute(System.Type t) {
-			check = (t == null);
-		}
-	}
-}

+ 0 - 167
tests/unit/native_cs/src/haxe/test/Base.cs

@@ -1,167 +0,0 @@
-namespace haxe.test
-{
-
-public class Base
-{
-	~Base() { someString = null; }
-	//some haxe-specific keywords
-
-	public static readonly int inline = 42;
-	public static readonly int callback = 43;
-	public static readonly int cast = 44;
-	public static int untyped = 45;
-
-	//final + static variable = inline var in Haxe
-	const int inlineNumber = 42;
-
-	//cannot be inline
-	public static int notInlineNumber = 42;
-
-	public string someString;
-	private string privateField;
-	protected int protectedField;
-
-	//static + nonstatic clash
-	public static int nameClash(Base t)
-	{
-		return -1;
-	}
-
-	public string prop 
-	{
-		get
-		{
-			return "SomeValue";
-		}
-	}
-
-	public int this[int i]
-	{
-		get { return i * 20; }
-	}
-
-	public int Issue4325 { get; protected set; }
-
-	public void setIssue4325(int val)
-	{
-		this.Issue4325 = val;
-	}
-
-	public int this[int i, int j]
-	{
-		get { return i * j; }
-	}
-
-	public int optional(int i=42)
-	{
-		return i * 10;
-	}
-
-	public virtual int nameClash()
-	{
-		return 1;
-	}
-
-	protected int protectedFunction()
-	{
-		return protectedField;
-	}
-
-	public int varNameClash(int b)
-	{
-		return b;
-	}
-
-	public static double varNameClash(double d)
-	{
-		return d;
-	}
-	
-	public static char charTest(char c)
-	{
-		return c;
-	}
-
-	public static byte byteTest(byte b)
-	{
-		return b;
-	}
-
-	public class InnerClass : Base
-	{
-		~InnerClass() { privateField = 0; }
-
-		private int privateField = 42;
-
-		//protected override without explicit override tag
-		protected int protectedFunction()
-		{
-			return privateField;
-		}
-
-		public override int nameClash()
-		{
-			return 10;
-		}
-
-		public static int getValue(OverloadInterface2 oiface)
-		{
-			return oiface.someOverloadedMethod(42);
-		}
-
-		public class InnerInnerClass : InnerClass2
-		{
-
-
-			//protected override without explicit override tag
-			protected int protectedFunction()
-			{
-				return 10;
-			}
-		}
-	}
-
-	public class InnerClass2 : InnerClass, OverloadInterface1, OverloadInterface2
-	{
-		public void someOverloadedMethod(string a1)
-		{
-
-		}
-
-		public int someOverloadedMethod(int a1)
-		{
-			return a1;
-		}
-	}
-}
-
-// Issue #3474
-
-public interface ITextFile
-{
-	string Property { get; }
-}
-
-public interface ITextBuffer : ITextFile
-{
-}
-
-public interface IEditableTextFile : ITextFile
-{
-	new string Property { get; set; }
-}
-
-public interface IEditableTextBuffer : IEditableTextFile, ITextBuffer
-{
-}
-
-public class lowerCaseClass
-{
-	public bool works;
-	public lowerCaseClass()
-	{
-		works = true;
-	}
-}
-
-}

+ 0 - 39
tests/unit/native_cs/src/haxe/test/Generic1.cs

@@ -1,39 +0,0 @@
-namespace haxe.test
-{
-
-public class Generic1<T> where T : Base
-{
-	public T value;
-
-	public Generic1()
-	{
-
-	}
-
-	public Generic1(T value)
-	{
-		this.value = value;
-	}
-
-	public void setValue(T v)
-	{
-		this.value = v;
-	}
-
-	public T getValue()
-	{
-		return value;
-	}
-
-	public string getSomeString()
-	{
-		return value.someString;
-	}
-
-	public string complexTypeParameterOfTypeParameter<B2>(B2 b) where B2 : T
-	{
-		return b.someString + value.someString;
-	}
-}
-
-}

+ 0 - 14
tests/unit/native_cs/src/haxe/test/GenericHelper.cs

@@ -1,14 +0,0 @@
-namespace haxe.test
-{
-
-public class GenericHelper
-{
-	public Generic1<Base.InnerClass> typedGeneric;
-
-	public static Generic1<X> staticTypedGeneric<X>(X cl) where X : Base.InnerClass
-	{
-		return new Generic1<X>();
-	}
-}
-
-}

+ 0 - 90
tests/unit/native_cs/src/haxe/test/MyClass.cs

@@ -1,90 +0,0 @@
-namespace haxe.test
-{
-
-public class MyClass
-{
-	virtual public void normalOverload(string a)
-	{
-
-	}
-
-	virtual public void normalOverload(int a)
-	{
-
-	}
-
-	virtual public void normalOverload(bool a)
-	{
-
-	}
-
-	virtual public void normalOverload(object a)
-	{
-
-	}
-
-	virtual public void normalOverload(long a)
-	{
-
-	}
-
-	virtual public void normalOverload(float a)
-	{
-
-	}
-
-	virtual public void normalOverload(double a)
-	{
-
-	}
-
-	virtual public void normalOverload(Base a)
-	{
-		
-	}
-
-	virtual public void normalOverload(VoidVoid a)
-	{
-	}
-
-	public void outTest(out int i)
-	{
-		i = 42;
-	}
-
-	public void refTest(ref int i)
-	{
-		i *= 42;
-	}
-
-	public void dispatch()
-	{
-		if (voidvoid != null)
-			this.voidvoid.Invoke();
-	}
-
-	virtual public int SomeProp
-	{
-		get { return 42; }
-	}
-
-	virtual public int SomeProp2
-	{
-		get { return 42; }
-	}
-
-	public event VoidVoid voidvoid;
-	public static event VoidVoid voidvoid2;
-
-	public static void dispatch2()
-	{
-		if (voidvoid2 != null)
-			voidvoid2.Invoke();
-	}
-
-	public readonly int readonlyField = 5;
-}
-
-public delegate void VoidVoid();
-
-}

+ 0 - 9
tests/unit/native_cs/src/haxe/test/OverloadInterface1.cs

@@ -1,9 +0,0 @@
-namespace haxe.test
-{
-
-public interface OverloadInterface1
-{
-	void someOverloadedMethod(string a1);
-}
-
-}

+ 0 - 9
tests/unit/native_cs/src/haxe/test/OverloadInterface2.cs

@@ -1,9 +0,0 @@
-namespace haxe.test
-{
-
-public interface OverloadInterface2
-{
-	int someOverloadedMethod(int a1);
-}
-
-}

+ 0 - 36
tests/unit/native_cs/src/haxe/test/StaticAndInstanceClash.cs

@@ -1,36 +0,0 @@
-namespace haxe.test
-{
-
-public class StaticAndInstanceClash : Base.InnerClass
-{
-	~StaticAndInstanceClash() {}
-	public static string someString;
-
-	public class StaticAndInstanceClashSame : StaticAndInstanceClash
-	{
-		public int someInt;
-	}
-
-	public class StaticAndInstanceAndMethodClash : StaticAndInstanceClashSame
-	{
-
-		private float sfloat = 5;
-		private int sint = 5;
-		public float someFloat()
-		{
-			return sfloat;
-		}
-
-		public float someFloat(float val)
-		{
-			return sfloat = val;
-		}
-
-		public int someInt()
-		{
-			return sint;
-		}
-	}
-}
-
-}

+ 0 - 9
tests/unit/native_cs/src/haxe/test/TEnum.cs

@@ -1,9 +0,0 @@
-namespace haxe.test
-{
-
-public enum TEnum
-{
-	TA,TB,TC
-}
-
-}

+ 0 - 33
tests/unit/native_cs/src/haxe/test/TEnumWithValue.cs

@@ -1,33 +0,0 @@
-namespace haxe.test
-{
-
-public enum TEnumWithValue
-{
-	TVA = 0x100,TVB = 0x1,TVD = 0x10, TVC = 0x20
-}
-
-public enum TEnumWithBigValue : ulong
-{
-	TBA = 0x1000000000L, 
-	TBD = 0x200000000000L, 
-	TBB = 0x100000000L, 
-	TBC = 0x3000000000000L, 
-}
-
-[System.Flags]
-public enum TEnumWithFlag
-{
-	TFA = 0x100,TFB = 0x1,TFD = 0x10, TFC = 0x20
-}
-
-[System.Flags]
-public enum TEnumWithBigFlag : ulong
-{
-	TFBA = 0x1000000000L, 
-	TFBD = 0x200000000000L, 
-	TFBB = 0x100000000L, 
-	TFBC = 0x3000000000000L, 
-}
-
-}
-