فهرست منبع

[display] start using haxe-formatter in the display tests

Jens Fischer 6 سال پیش
والد
کامیت
d572da41be
100فایلهای تغییر یافته به همراه1151 افزوده شده و 1095 حذف شده
  1. 1 1
      tests/display/.vscode/launch.json
  2. 2 4
      tests/display/.vscode/settings.json
  3. 0 1
      tests/display/src/Diagnostic.hx
  4. 41 18
      tests/display/src/DisplayTestCase.hx
  5. 14 10
      tests/display/src/DisplayTestContext.hx
  6. 24 21
      tests/display/src/File.hx
  7. 5 2
      tests/display/src/Macro.hx
  8. 15 15
      tests/display/src/ModuleSymbolEntry.hx
  9. 9 9
      tests/display/src/SignatureHelp.hx
  10. 6 6
      tests/display/src/Types.hx
  11. 18 18
      tests/display/src/cases/Abstract.hx
  12. 47 47
      tests/display/src/cases/ArrayAccessSignature.hx
  13. 37 39
      tests/display/src/cases/ArrowFunctions.hx
  14. 42 42
      tests/display/src/cases/Basic.hx
  15. 16 16
      tests/display/src/cases/BuildMacro.hx
  16. 31 31
      tests/display/src/cases/Completion.hx
  17. 53 53
      tests/display/src/cases/DocumentSymbols.hx
  18. 9 8
      tests/display/src/cases/IImport.hx
  19. 15 16
      tests/display/src/cases/InMacro.hx
  20. 21 21
      tests/display/src/cases/Issue4155.hx
  21. 20 20
      tests/display/src/cases/Issue4345.hx
  22. 15 15
      tests/display/src/cases/Issue5141.hx
  23. 1 1
      tests/display/src/cases/Issue5166.hx
  24. 5 5
      tests/display/src/cases/Issue5171.hx
  25. 6 6
      tests/display/src/cases/Issue5172.hx
  26. 7 7
      tests/display/src/cases/Issue5173.hx
  27. 4 4
      tests/display/src/cases/Issue5649.hx
  28. 5 5
      tests/display/src/cases/Issue5684.hx
  29. 9 9
      tests/display/src/cases/Issue5712.hx
  30. 10 10
      tests/display/src/cases/Issue5729.hx
  31. 53 53
      tests/display/src/cases/Issue5767.hx
  32. 6 6
      tests/display/src/cases/Issue5775.hx
  33. 7 7
      tests/display/src/cases/Issue5796.hx
  34. 2 2
      tests/display/src/cases/Issue5967.hx
  35. 5 5
      tests/display/src/cases/Issue5988.hx
  36. 5 5
      tests/display/src/cases/Issue5999.hx
  37. 5 5
      tests/display/src/cases/Issue6004.hx
  38. 10 10
      tests/display/src/cases/Issue6020.hx
  39. 11 11
      tests/display/src/cases/Issue6068.hx
  40. 9 9
      tests/display/src/cases/Issue6227.hx
  41. 5 5
      tests/display/src/cases/Issue6265.hx
  42. 7 7
      tests/display/src/cases/Issue6275.hx
  43. 8 8
      tests/display/src/cases/Issue6381.hx
  44. 7 7
      tests/display/src/cases/Issue6396.hx
  45. 6 6
      tests/display/src/cases/Issue6399.hx
  46. 9 9
      tests/display/src/cases/Issue6405.hx
  47. 7 7
      tests/display/src/cases/Issue6416.hx
  48. 5 5
      tests/display/src/cases/Issue6417.hx
  49. 9 9
      tests/display/src/cases/Issue6421.hx
  50. 8 8
      tests/display/src/cases/Issue6422.hx
  51. 7 7
      tests/display/src/cases/Issue6423.hx
  52. 6 6
      tests/display/src/cases/Issue6434.hx
  53. 3 3
      tests/display/src/cases/Issue6442.hx
  54. 13 13
      tests/display/src/cases/Issue6740.hx
  55. 4 4
      tests/display/src/cases/Issue6756.hx
  56. 8 8
      tests/display/src/cases/Issue6779.hx
  57. 9 9
      tests/display/src/cases/Issue6923.hx
  58. 4 4
      tests/display/src/cases/Issue6943.hx
  59. 9 9
      tests/display/src/cases/Issue6951.hx
  60. 2 2
      tests/display/src/cases/Issue6997.hx
  61. 5 5
      tests/display/src/cases/Issue7020.hx
  62. 5 5
      tests/display/src/cases/Issue7022.hx
  63. 4 4
      tests/display/src/cases/Issue7023.hx
  64. 2 2
      tests/display/src/cases/Issue7027.hx
  65. 41 41
      tests/display/src/cases/Issue7029.hx
  66. 3 3
      tests/display/src/cases/Issue7046.hx
  67. 5 5
      tests/display/src/cases/Issue7047.hx
  68. 5 5
      tests/display/src/cases/Issue7050.hx
  69. 18 18
      tests/display/src/cases/Issue7051.hx
  70. 52 24
      tests/display/src/cases/Issue7053.hx
  71. 14 14
      tests/display/src/cases/Issue7055.hx
  72. 6 6
      tests/display/src/cases/Issue7057.hx
  73. 5 5
      tests/display/src/cases/Issue7059.hx
  74. 5 5
      tests/display/src/cases/Issue7060.hx
  75. 18 18
      tests/display/src/cases/Issue7061.hx
  76. 9 9
      tests/display/src/cases/Issue7063.hx
  77. 13 13
      tests/display/src/cases/Issue7066.hx
  78. 13 13
      tests/display/src/cases/Issue7068.hx
  79. 10 10
      tests/display/src/cases/Issue7069.hx
  80. 8 8
      tests/display/src/cases/Issue7071.hx
  81. 11 11
      tests/display/src/cases/Issue7072.hx
  82. 9 9
      tests/display/src/cases/Issue7075.hx
  83. 6 6
      tests/display/src/cases/Issue7082.hx
  84. 16 16
      tests/display/src/cases/Issue7084.hx
  85. 5 5
      tests/display/src/cases/Issue7086.hx
  86. 8 8
      tests/display/src/cases/Issue7089.hx
  87. 8 8
      tests/display/src/cases/Issue7092.hx
  88. 6 6
      tests/display/src/cases/Issue7098.hx
  89. 6 6
      tests/display/src/cases/Issue7102.hx
  90. 5 5
      tests/display/src/cases/Issue7111.hx
  91. 6 6
      tests/display/src/cases/Issue7133.hx
  92. 10 10
      tests/display/src/cases/Issue7136.hx
  93. 10 10
      tests/display/src/cases/Issue7137.hx
  94. 8 8
      tests/display/src/cases/Issue7148.hx
  95. 5 5
      tests/display/src/cases/Issue7158.hx
  96. 5 5
      tests/display/src/cases/Issue7171.hx
  97. 14 14
      tests/display/src/cases/Issue7172.hx
  98. 3 3
      tests/display/src/cases/Issue7211.hx
  99. 22 22
      tests/display/src/cases/Issue7219.hx
  100. 10 10
      tests/display/src/cases/Issue7224.hx

+ 1 - 1
tests/display/.vscode/launch.json

@@ -2,7 +2,7 @@
 	"version": "0.2.0",
 	"configurations": [
 		{
-			"name": "Haxe-eval",
+			"name": "Interpreter",
 			"type": "haxe-eval",
 			"request": "launch"
 		}

+ 2 - 4
tests/display/.vscode/settings.json

@@ -1,7 +1,5 @@
 {
-	"haxe.displayConfigurations": [
-		{"label": "IssueTemplate", "args": ["build.hxml", "-D", "test=IssueTemplate"]}
-	],
+	"editor.formatOnSave": true,
 	"haxe.enableCompilationServer": false,
 	"haxeTestExplorer.testCommand": [
 		"${haxe}",
@@ -9,5 +7,5 @@
 		"-lib",
 		"test-adapter"
 	],
-	"haxeTestExplorer.launchConfiguration": "Haxe-eval"
+	"haxeTestExplorer.launchConfiguration": "Interpreter"
 }

+ 0 - 1
tests/display/src/Diagnostic.hx

@@ -1,5 +1,4 @@
 // from vshaxe
-
 import haxe.display.Position.Range;
 
 enum abstract UnresolvedIdentifierSuggestion(Int) {

+ 41 - 18
tests/display/src/DisplayTestCase.hx

@@ -8,24 +8,47 @@ using Lambda;
 class DisplayTestCase implements utest.ITest {
 	var ctx:DisplayTestContext;
 
-	public function new() { }
+	public function new() {}
 
 	// api
-	inline function pos(name) return ctx.pos(name);
-	inline function fields(pos) return ctx.fields(pos);
-	inline function toplevel(pos) return ctx.toplevel(pos);
-	inline function type(pos) return ctx.type(pos);
-	inline function position(pos) return ctx.position(pos);
-	inline function usage(pos) return ctx.usage(pos);
-	inline function range(pos1, pos2) return ctx.range(pos1, pos2);
-	inline function signature(pos1) return ctx.signature(pos1);
-	inline function metadataDoc(pos1) return ctx.metadataDoc(pos1);
-	inline function diagnostics() return ctx.diagnostics();
-
-	inline function noCompletionPoint(f) return ctx.hasErrorMessage(f, "No completion point");
-	inline function typeNotFound(f, typeName) return ctx.hasErrorMessage(f, "Type not found : " + typeName);
-
-	function assert(v:Bool) Assert.isTrue(v);
+	inline function pos(name)
+		return ctx.pos(name);
+
+	inline function fields(pos)
+		return ctx.fields(pos);
+
+	inline function toplevel(pos)
+		return ctx.toplevel(pos);
+
+	inline function type(pos)
+		return ctx.type(pos);
+
+	inline function position(pos)
+		return ctx.position(pos);
+
+	inline function usage(pos)
+		return ctx.usage(pos);
+
+	inline function range(pos1, pos2)
+		return ctx.range(pos1, pos2);
+
+	inline function signature(pos1)
+		return ctx.signature(pos1);
+
+	inline function metadataDoc(pos1)
+		return ctx.metadataDoc(pos1);
+
+	inline function diagnostics()
+		return ctx.diagnostics();
+
+	inline function noCompletionPoint(f)
+		return ctx.hasErrorMessage(f, "No completion point");
+
+	inline function typeNotFound(f, typeName)
+		return ctx.hasErrorMessage(f, "Type not found : " + typeName);
+
+	function assert(v:Bool)
+		Assert.isTrue(v);
 
 	function eq<T>(expected:T, actual:T, ?pos:haxe.PosInfos) {
 		Assert.equals(expected, actual, pos);
@@ -35,7 +58,7 @@ class DisplayTestCase implements utest.ITest {
 		Assert.same(expected, actual, pos);
 	}
 
-	function arrayCheck<T>(expected:Array<T>, actual:Array<T>, f : T -> String, ?pos:haxe.PosInfos) {
+	function arrayCheck<T>(expected:Array<T>, actual:Array<T>, f:T->String, ?pos:haxe.PosInfos) {
 		var expected = [for (expected in expected) f(expected) => expected];
 		for (actual in actual) {
 			var key = f(actual);
@@ -85,4 +108,4 @@ class DisplayTestCase implements utest.ITest {
 	function report(message, pos:haxe.PosInfos) {
 		Assert.fail(message, pos);
 	}
-}
+}

+ 14 - 10
tests/display/src/DisplayTestContext.hx

@@ -1,8 +1,8 @@
 using StringTools;
+
 import Types;
 
 class HaxeInvocationException {
-
 	public var message:String;
 	public var fieldName:String;
 	public var arguments:Array<String>;
@@ -21,12 +21,12 @@ class HaxeInvocationException {
 }
 
 class DisplayTestContext {
-	var markers:Map<Int,Int>;
+	var markers:Map<Int, Int>;
 	var fieldName:String;
 
 	public final source:File;
 
-	public function new(path:String, fieldName:String, source:String, markers:Map<Int,Int>) {
+	public function new(path:String, fieldName:String, source:String, markers:Map<Int, Int>) {
 		this.fieldName = fieldName;
 		this.source = new File(path, source);
 		this.markers = markers;
@@ -34,7 +34,8 @@ class DisplayTestContext {
 
 	public function pos(id:Int):Position {
 		var r = markers[id];
-		if (r == null) throw "No such marker: " + id;
+		if (r == null)
+			throw "No such marker: " + id;
 		return new Position(r);
 	}
 
@@ -87,20 +88,23 @@ class DisplayTestContext {
 		return if (result == null) [] else result.diagnostics;
 	}
 
-	public function hasErrorMessage(f:Void -> Void, message:String) {
+	public function hasErrorMessage(f:Void->Void, message:String) {
 		return try {
 			f();
 			false;
-		} catch(exc:HaxeInvocationException) {
+		} catch (exc:HaxeInvocationException) {
 			return exc.message.indexOf(message) != -1;
 		}
 	}
 
 	function callHaxe(displayPart:String):String {
 		var args = [
-			"-cp", "src",
-			"-D", "display-stdin",
-			"-lib", "utest",
+			"-cp",
+			"src",
+			"-D",
+			"display-stdin",
+			"-lib",
+			"utest",
 			"--display",
 			source.path + "@" + displayPart,
 		];
@@ -129,7 +133,7 @@ class DisplayTestContext {
 		return StringTools.trim(xml.firstChild().nodeValue);
 	}
 
-	static function  extractSignatures(result:String) {
+	static function extractSignatures(result:String) {
 		var xml = Xml.parse('<x>$result</x>');
 		xml = xml.firstElement();
 		var ret = [];

+ 24 - 21
tests/display/src/File.hx

@@ -1,8 +1,9 @@
 import haxe.display.Position;
 
 class File {
-	public var content(default,null):String;
-	public var path(default,null):String;
+	public var content(default, null):String;
+	public var path(default, null):String;
+
 	var lines:Array<Int>;
 
 	public function new(path:String, content:String) {
@@ -16,8 +17,12 @@ class File {
 		// составляем массив позиций начала строк
 		var s = 0, p = 0;
 		while (p < content.length) {
-			inline function nextChar() return StringTools.fastCodeAt(content, p++);
-			inline function line() { lines.push(s); s = p; };
+			inline function nextChar()
+				return StringTools.fastCodeAt(content, p++);
+			inline function line() {
+				lines.push(s);
+				s = p;
+			};
 			switch (nextChar()) {
 				case "\n".code:
 					line();
@@ -32,13 +37,12 @@ class File {
 		function loop(min, max) {
 			var mid = (min + max) >> 1;
 			var start = lines[mid];
-			return
-				if (mid == min)
-					{line: mid, character: pos - start + 1};
-				else if (start > pos)
-					loop(min, mid);
-				else
-					loop(mid, max);
+			return if (mid == min)
+				{line: mid, character: pos - start + 1};
+			else if (start > pos)
+				loop(min, mid);
+			else
+				loop(mid, max);
 		}
 		return loop(0, lines.length);
 	}
@@ -54,19 +58,18 @@ class File {
 		var range = findRange(min, max);
 		var start = range.start;
 		var end = range.end;
-		var pos =
-			if (start.line == end.line) {
-				if (start.character == end.character)
-					'character ${start.character}';
-				else
-					'characters ${start.character}-${end.character}';
-			} else {
-				'lines ${start.line + 1}-${end.line + 1}';
-			}
+		var pos = if (start.line == end.line) {
+			if (start.character == end.character)
+				'character ${start.character}';
+			else
+				'characters ${start.character}-${end.character}';
+		} else {
+			'lines ${start.line + 1}-${end.line + 1}';
+		}
 		return '$path:${start.line + 1}: $pos';
 	}
 
 	public static inline function read(path:String) {
 		return new File(path, sys.io.File.getContent(path));
 	}
-}
+}

+ 5 - 2
tests/display/src/Macro.hx

@@ -47,7 +47,10 @@ class Macro {
 
 			switch (field.kind) {
 				case FFun(f) if (f.expr != null):
-					f.expr = macro @:pos(f.expr.pos) { ctx = new DisplayTestContext($v{filename}, $v{field.name}, $v{src}, $markers); ${f.expr} };
+					f.expr = macro @:pos(f.expr.pos) {
+						ctx = new DisplayTestContext($v{filename}, $v{field.name}, $v{src}, $markers);
+						${f.expr}
+					};
 				case _:
 			}
 		}
@@ -71,7 +74,7 @@ class Macro {
 				if (p.ext == "hx") {
 					var tp = {pack: pack, name: p.file};
 					cases.push(macro new $tp());
-				} else if(Path.join([path, file]).isDirectory()) {
+				} else if (Path.join([path, file]).isDirectory()) {
 					loop(pack.concat([file]));
 				}
 			}

+ 15 - 15
tests/display/src/ModuleSymbolEntry.hx

@@ -1,21 +1,21 @@
 // Taken from vshaxe... not ideal to copy it here
 
 private enum abstract ModuleSymbolKind(Int) {
-    var MClass = 1;
-    var MInterface = 2;
-    var MEnum = 3;
-    var MTypedef = 4;
-    var MAbstract = 5;
-    var MField = 6;
-    var MProperty = 7;
-    var MMethod = 8;
-    var MConstructor = 9;
-    var MFunction = 10;
-    var MVariable = 11;
+	var MClass = 1;
+	var MInterface = 2;
+	var MEnum = 3;
+	var MTypedef = 4;
+	var MAbstract = 5;
+	var MField = 6;
+	var MProperty = 7;
+	var MMethod = 8;
+	var MConstructor = 9;
+	var MFunction = 10;
+	var MVariable = 11;
 }
 
 typedef ModuleSymbolEntry = {
-    var name:String;
-    var kind:ModuleSymbolKind;
-    var ?containerName:String;
-}
+	var name:String;
+	var kind:ModuleSymbolKind;
+	var ?containerName:String;
+}

+ 9 - 9
tests/display/src/SignatureHelp.hx

@@ -1,18 +1,18 @@
 // from vshaxe
 
 typedef SignatureHelp = {
-    var signatures:Array<SignatureInformation>;
-    var ?activeSignature:Int;
-    var ?activeParameter:Int;
+	var signatures:Array<SignatureInformation>;
+	var ?activeSignature:Int;
+	var ?activeParameter:Int;
 }
 
 typedef SignatureInformation = {
-    var label:String;
-    var ?documentation:String;
-    var ?parameters:Array<ParameterInformation>;
+	var label:String;
+	var ?documentation:String;
+	var ?parameters:Array<ParameterInformation>;
 }
 
 typedef ParameterInformation = {
-    var label:String;
-    var ?documentation:String;
-}
+	var label:String;
+	var ?documentation:String;
+}

+ 6 - 6
tests/display/src/Types.hx

@@ -1,13 +1,13 @@
 typedef ToplevelElement = {
-	kind: String,
-	name: String,
-	type: String
+	kind:String,
+	name:String,
+	type:String
 }
 
 typedef FieldElement = {
-	name: String,
-	type: String,
-	kind: String,
+	name:String,
+	type:String,
+	kind:String,
 }
 
 abstract Position(Int) to Int {

+ 18 - 18
tests/display/src/cases/Abstract.hx

@@ -2,12 +2,12 @@ package cases;
 
 class Abstract extends DisplayTestCase {
 	/**
-	abstract A(Int) {
-		public function new({-3-}i{-4-}) {
-			this = {-1-}i;
-			trace("f{-2-}oo");
+		abstract A(Int) {
+			public function new({-3-}i{-4-}) {
+				this = {-1-}i;
+				trace("f{-2-}oo");
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(3, 4), position(pos(1)));
@@ -15,21 +15,21 @@ class Abstract extends DisplayTestCase {
 	}
 
 	/**
-	abstract MyAbstract(String) {
-		public function new() this = "foo";
+		abstract MyAbstract(String) {
+			public function new() this = "foo";
 
-		public function instanceField():Void {
-			{-1-}
-		}
-		static public function staticField():Void {
-			{-2-}
+			public function instanceField():Void {
+				{-1-}
+			}
+			static public function staticField():Void {
+				{-2-}
+			}
 		}
-	}
-	class MyClass {
-		static function main() {
-			MyAbstract.{-3-}
+		class MyClass {
+			static function main() {
+				MyAbstract.{-3-}
+			}
 		}
-	}
 	**/
 	function test2() {
 		var top1 = toplevel(pos(1));
@@ -44,4 +44,4 @@ class Abstract extends DisplayTestCase {
 		eq(false, hasField(fields, "instanceField", "Void -> Void"));
 		eq(true, hasField(fields, "staticField", "Void -> Void"));
 	}
-}
+}

+ 47 - 47
tests/display/src/cases/ArrayAccessSignature.hx

@@ -4,77 +4,77 @@ import SignatureHelp;
 
 class ArrayAccessSignature extends DisplayTestCase {
 	/**
-	class Some {
-		function main() {
-			[][{-1-}
+		class Some {
+			function main() {
+				[][{-1-}
+			}
 		}
-	}
 	**/
 	function testArray1() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[][{-1-}]
+		class Some {
+			function main() {
+				[][{-1-}]
+			}
 		}
-	}
 	**/
 	function testArray2() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[][1{-1-}
+		class Some {
+			function main() {
+				[][1{-1-}
+			}
 		}
-	}
 	**/
 	function testArray3() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[][1{-1-}]
+		class Some {
+			function main() {
+				[][1{-1-}]
+			}
 		}
-	}
 	**/
 	function testArray4() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[][1{-1-}2
+		class Some {
+			function main() {
+				[][1{-1-}2
+			}
 		}
-	}
 	**/
 	function testArray5() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[][1{-1-}2]
+		class Some {
+			function main() {
+				[][1{-1-}2]
+			}
 		}
-	}
 	**/
 	function testArray6() {
 		sigEq(0, [["index:Int"]], signature(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			[1 => 2][{-1-}
+		class Some {
+			function main() {
+				[1 => 2][{-1-}
+			}
 		}
-	}
 	**/
 	function testMap1() {
 		// because screw consistency
@@ -82,36 +82,36 @@ class ArrayAccessSignature extends DisplayTestCase {
 	}
 
 	/**
-	class Some {
-		function main() {
-			call([1 => 2][{-1-}
-		}
+		class Some {
+			function main() {
+				call([1 => 2][{-1-}
+			}
 
-		static function call(i1:Int, i2:Int) { }
-	}
+			static function call(i1:Int, i2:Int) { }
+		}
 	**/
 	function testInCall1() {
 		sigEq(0, [["key:Int"], ["k:Int", "v:Int"]], signature(pos(1)));
 	}
 
 	/**
-	abstract MyArray<T>(Array<T>) {
-		public function new() this = [];
+		abstract MyArray<T>(Array<T>) {
+			public function new() this = [];
 
-		@:op([])
-		function arrayRead(k:Int):T return cast this[k];
+			@:op([])
+			function arrayRead(k:Int):T return cast this[k];
 
-		@:op([])
-		function arrayReadWrite(k:Int, v:T) this[k] = v;
-	}
-	class Some {
-		function main() {
-			var m = new MyArray();
-			var k = m[{-1-}
+			@:op([])
+			function arrayReadWrite(k:Int, v:T) this[k] = v;
+		}
+		class Some {
+			function main() {
+				var m = new MyArray();
+				var k = m[{-1-}
+			}
 		}
-	}
 	**/
 	function testVoidReturn() {
 		sigEq(0, [["k:Int"]], signature(pos(1)));
 	}
-}
+}

+ 37 - 39
tests/display/src/cases/ArrowFunctions.hx

@@ -1,45 +1,43 @@
 package cases;
 
 class ArrowFunctions extends DisplayTestCase {
+	/**
+		var obj = { foo : 1 };
+		var f = () -> obj.{-1-}
+		var f = () -> {
+			[1].{-2-}
+		}
+	**/
+	@:funcCode function testBodyCompletion1() {
+		eq(true, hasField(fields(pos(1)), "foo", "Int"));
+		eq(true, hasField(fields(pos(2)), "copy", "Void -> Array<Int>"));
+	}
 
-    /**
-    var obj = { foo : 1 };
-    var f = () -> obj.{-1-}
-    var f = () -> {
-        [1].{-2-}
-    }
-    **/
-    @:funcCode function testBodyCompletion1(){
-        eq(true, hasField(fields(pos(1)), "foo", "Int"));
-        eq(true, hasField(fields(pos(2)), "copy", "Void -> Array<Int>"));
-    }
+	/**
+		enum E { EA; EB; EC; }
+		class SomeClass {
+			static function sf(){
+				(e:E) -> e.{-1-}
+			}
+		}
+	**/
+	function testBodyCompletion2() {
+		eq(true, hasField(fields(pos(1)), "getName", "Void -> String"));
+	}
 
-    /**
-    enum E { EA; EB; EC; }
-    class SomeClass {
-        static function sf(){
-            (e:E) -> e.{-1-}
-        }
-    }
-    **/
-    function testBodyCompletion2(){
-        eq(true, hasField(fields(pos(1)), "getName", "Void -> String"));
-    }
+	/**
+		var arr = [1,2,3,4,5];
+		arr.map( {-1-}a -> a{-2-} + 1 )
+	**/
+	@:funcCode function testHover() {
+		eq("Int", type(pos(1)));
+		eq("Int", type(pos(2)));
+	}
 
-    /**
-    var arr = [1,2,3,4,5];
-    arr.map( {-1-}a -> a{-2-} + 1 )
-    **/
-    @:funcCode function testHover(){
-        eq("Int", type(pos(1)));
-        eq("Int", type(pos(2)));
-    }
-
-
-    /**
-    x -> { {-1-}
-    **/
-    @:funcCode function testTopLevel(){
-        eq(true, hasToplevel(toplevel(pos(1)), "local", "x"));
-    }
-}
+	/**
+		x -> { {-1-}
+	**/
+	@:funcCode function testTopLevel() {
+		eq(true, hasToplevel(toplevel(pos(1)), "local", "x"));
+	}
+}

+ 42 - 42
tests/display/src/cases/Basic.hx

@@ -2,24 +2,24 @@ package cases;
 
 class Basic extends DisplayTestCase {
 	/**
-	class Some {
-		function main() {
-			var a = 5;
-			a{-1-}
+		class Some {
+			function main() {
+				var a = 5;
+				a{-1-}
+			}
 		}
-	}
 	**/
 	function testType1() {
 		eq("Int", type(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			var {-1-}variable{-2-} = 5;
-			{-3-}variabl{-4-}e{-5-};
+		class Some {
+			function main() {
+				var {-1-}variable{-2-} = 5;
+				{-3-}variabl{-4-}e{-5-};
+			}
 		}
-	}
 	**/
 	function testPosition1() {
 		eq(range(1, 2), position(pos(3)));
@@ -28,38 +28,38 @@ class Basic extends DisplayTestCase {
 	}
 
 	/**
-	class Some {
-		function main() {
-			var variabl{-1-}e = 5;
-			{-2-}variable{-3-};
+		class Some {
+			function main() {
+				var variabl{-1-}e = 5;
+				{-2-}variable{-3-};
+			}
 		}
-	}
 	**/
 	function testUsage1() {
 		eq(range(2, 3), usage(pos(1))[0]);
 	}
 
 	/**
-	class Some {
-		function main() {
-			var variabl{-1-}e = 5;
-			{-2-}variable{-3-};
-			{-4-}variable{-5-};
+		class Some {
+			function main() {
+				var variabl{-1-}e = 5;
+				{-2-}variable{-3-};
+				{-4-}variable{-5-};
+			}
 		}
-	}
 	**/
 	function testUsage2() {
 		arrayEq([range(2, 3), range(4, 5)], usage(pos(1)));
 	}
 
 	/**
-	class Some {
-		function main() {
-			{-1-}te{-2-}st{-3-}();
-		}
+		class Some {
+			function main() {
+				{-1-}te{-2-}st{-3-}();
+			}
 
-		static function te{-4-}st() { }
-	}
+			static function te{-4-}st() { }
+		}
 	**/
 	function testUsage3() {
 		arrayEq([range(1, 3)], usage(pos(2)));
@@ -67,7 +67,7 @@ class Basic extends DisplayTestCase {
 	}
 
 	/**
-	function test(na{-1-}me:St{-2-}ring) { }
+		function test(na{-1-}me:St{-2-}ring) { }
 	**/
 	@:funcCode function testLocalFunction() {
 		eq("String", type(pos(1)));
@@ -75,16 +75,16 @@ class Basic extends DisplayTestCase {
 	}
 
 	/**
-	class Some {
-		var x1 = "fo{-1-}";
-		static var x2 = "fo{-2-}";
-		static inline var x3 = "fo{-3-}";
+		class Some {
+			var x1 = "fo{-1-}";
+			static var x2 = "fo{-2-}";
+			static inline var x3 = "fo{-3-}";
 
-		var x4(default, null) = "fo{-4-}";
-		static var x5(default, null) = "fo{-5-}";
+			var x4(default, null) = "fo{-4-}";
+			static var x5(default, null) = "fo{-5-}";
 
-		static var x{-6-}6:String;
-	}
+			static var x{-6-}6:String;
+		}
 	**/
 	function testFieldDisplay() {
 		eq("String", type(pos(1)));
@@ -96,19 +96,19 @@ class Basic extends DisplayTestCase {
 	}
 
 	/**
-	var a:Ar{-1-}ray;
+		var a:Ar{-1-}ray;
 	**/
 	@:funcCode function testMissingParams() {
 		eq("Array<Array.T>", type(pos(1)));
 	}
 
 	/**
-	class Some {
-		function new(someName:Int) {}
-		function main() {
-			Some.new{-1-}
+		class Some {
+			function new(someName:Int) {}
+			function main() {
+				Some.new{-1-}
+			}
 		}
-	}
 	**/
 	function testCtorClosureType() {
 		eq("(someName : Int) -> cases.Some", type(pos(1)));

+ 16 - 16
tests/display/src/cases/BuildMacro.hx

@@ -2,25 +2,25 @@ package cases;
 
 class BuildMacro extends DisplayTestCase {
 	/**
-	class MyMacro {
-		macro static public function build():Array<haxe.macro.Expr.Field> {
-			var fields = haxe.macro.Context.getBuildFields();
-			return fields;
+		class MyMacro {
+			macro static public function build():Array<haxe.macro.Expr.Field> {
+				var fields = haxe.macro.Context.getBuildFields();
+				return fields;
+			}
 		}
-	}
 
-	typedef {-7-}MyString{-8-} = String;
+		typedef {-7-}MyString{-8-} = String;
 
-	#if !macro
-	@:build(cases.BuildMacro.MyMacro.build())
-	#end
-	class Main {
-		function te{-1-}st({-5-}na{-2-}me{-6-}:MySt{-3-}ring):MyStr{-4-}ing {
-			return {-9-}nam{-10-}e{-11-};
-		}
+		#if !macro
+		@:build(cases.BuildMacro.MyMacro.build())
+		#end
+		class Main {
+			function te{-1-}st({-5-}na{-2-}me{-6-}:MySt{-3-}ring):MyStr{-4-}ing {
+				return {-9-}nam{-10-}e{-11-};
+			}
 
-		static function main() { }
-	}
+			static function main() { }
+		}
 	**/
 	function test1() {
 		eq("cases.MyString", type(pos(2)));
@@ -31,4 +31,4 @@ class BuildMacro extends DisplayTestCase {
 		eq(range(5, 6), position(pos(2)));
 		arrayEq([range(9, 11)], usage(pos(10)));
 	}
-}
+}

+ 31 - 31
tests/display/src/cases/Completion.hx

@@ -2,53 +2,53 @@ package cases;
 
 class Completion extends DisplayTestCase {
 	/**
-	var s = { foo: 1 };
-	s.{-1-}
+		var s = { foo: 1 };
+		s.{-1-}
 	**/
 	@:funcCode function testHaxeUnitPort1() {
 		eq(true, hasField(fields(pos(1)), "foo", "Int"));
 	}
 
 	/**
-	var s = { foo: 1 };
-	for (k in [s].iterator()) {
-		k.{-1-}
-	}
+		var s = { foo: 1 };
+		for (k in [s].iterator()) {
+			k.{-1-}
+		}
 	**/
 	@:funcCode function testHaxeUnitPort2() {
 		eq(true, hasField(fields(pos(1)), "foo", "Int"));
 	}
 
 	/**
-	var f = function():Iterator<{foo:Int}> {
-		return [s].iterator();
-	};
-	var s = { foo: 1 };
-	for (k in f()) {
-		k.{-1-}
-	}
+		var f = function():Iterator<{foo:Int}> {
+			return [s].iterator();
+		};
+		var s = { foo: 1 };
+		for (k in f()) {
+			k.{-1-}
+		}
 	**/
 	@:funcCode function testHaxeUnitPort3() {
 		eq(true, hasField(fields(pos(1)), "foo", "Int"));
 	}
 
 	/**
-	var x:haxe.macro.{-1-}
+		var x:haxe.macro.{-1-}
 	**/
 	@:funcCode function testHaxeUnitPort4() {
 		eq(true, hasPath(fields(pos(1)), "Expr"));
 	}
 
 	/**
-	var x:haxe.macro.Expr.{-1-}
+		var x:haxe.macro.Expr.{-1-}
 	**/
 	@:funcCode function testHaxeUnitPort5() {
 		eq(true, hasPath(fields(pos(1)), "ExprDef"));
 	}
 
 	/**
-	var s = { foo: 1 };
-	s.{-1-}f{-2-}o{-3-}o{-4-}
+		var s = { foo: 1 };
+		s.{-1-}f{-2-}o{-3-}o{-4-}
 	**/
 	@:funcCode function testNonDotCompletion1() {
 		eq(true, hasField(fields(pos(1)), "foo", "Int"));
@@ -58,21 +58,21 @@ class Completion extends DisplayTestCase {
 	}
 
 	/**
-	var s = { foo: 1 };
-	"foo".
-	wtf
-	var lol
-	miauga(
-	notArray[
-	[
-	(
-	{
-	{
-		obj:
-			obj
-				s.{-1-}
+		var s = { foo: 1 };
+		"foo".
+		wtf
+		var lol
+		miauga(
+		notArray[
+		[
+		(
+		{
+		{
+			obj:
+				obj
+					s.{-1-}
 	**/
 	@:funcCode function testDrunkAst1() {
 		eq(true, hasField(fields(pos(1)), "foo", "Int"));
 	}
-}
+}

+ 53 - 53
tests/display/src/cases/DocumentSymbols.hx

@@ -2,101 +2,101 @@ package cases;
 
 class DocumentSymbols extends DisplayTestCase {
 	/**
-	class Some {
-		function main() { }
-		static var x:String;
-		var y:Int;
-		var z(default, null):Bool;
-		function new() { }
-	}
+		class Some {
+			function main() { }
+			static var x:String;
+			var y:Int;
+			var z(default, null):Bool;
+			function new() { }
+		}
 	**/
 	function testClassFields() {
 		checkDocumentSymbols([
-			{ name: "Some", kind: MClass, containerName: null },
-			{ name: "main", kind: MMethod, containerName: "Some" },
-			{ name: "x", kind: MField, containerName: "Some" },
-			{ name: "y", kind: MField, containerName: "Some" },
-			{ name: "z", kind: MProperty, containerName: "Some" },
-			{ name: "new", kind: MConstructor, containerName: "Some" }
+			{name: "Some", kind: MClass, containerName: null},
+			{name: "main", kind: MMethod, containerName: "Some"},
+			{name: "x", kind: MField, containerName: "Some"},
+			{name: "y", kind: MField, containerName: "Some"},
+			{name: "z", kind: MProperty, containerName: "Some"},
+			{name: "new", kind: MConstructor, containerName: "Some"}
 		], ctx.documentSymbols());
 	}
 
 	/**
-	interface Some {
-		function test():Void;
-	}
+		interface Some {
+			function test():Void;
+		}
 	**/
 	function testInterface() {
 		checkDocumentSymbols([
-			{ name: "Some", kind: MInterface, containerName: null },
-			{ name: "test", kind: MMethod, containerName: "Some" }
+			{name: "Some", kind: MInterface, containerName: null},
+			{name: "test", kind: MMethod, containerName: "Some"}
 		], ctx.documentSymbols());
 	}
 
 	/**
-	enum E {
-		A;
-		B(s:String);
-	}
+		enum E {
+			A;
+			B(s:String);
+		}
 	**/
 	function testEnum() {
 		checkDocumentSymbols([
-			{ name: "E", kind: MEnum, containerName: null },
-			{ name: "A", kind: MMethod, containerName: "E" },
-			{ name: "B", kind: MMethod, containerName: "E" }
+			{name: "E", kind: MEnum, containerName: null},
+			{name: "A", kind: MMethod, containerName: "E"},
+			{name: "B", kind: MMethod, containerName: "E"}
 		], ctx.documentSymbols());
 	}
 
 	/**
-	typedef T = {
-		x:Int,
-	}
+		typedef T = {
+			x:Int,
+		}
 	**/
 	function testTypedef() {
 		checkDocumentSymbols([
-			{ name: "T", kind: MTypedef, containerName: null },
-			{ name: "x", kind: MField, containerName: "T" }
+			{name: "T", kind: MTypedef, containerName: null},
+			{name: "x", kind: MField, containerName: "T"}
 		], ctx.documentSymbols());
 	}
 
 	/**
-	abstract A(Int) {
-		public function new() { }
-		function f() { }
-	}
+		abstract A(Int) {
+			public function new() { }
+			function f() { }
+		}
 	**/
 	function testAbstract() {
 		checkDocumentSymbols([
-			{ name: "A", kind: MAbstract, containerName: null },
-			{ name: "new", kind: MConstructor, containerName: "A" },
-			{ name: "f", kind: MMethod, containerName: "A" }
+			{name: "A", kind: MAbstract, containerName: null},
+			{name: "new", kind: MConstructor, containerName: "A"},
+			{name: "f", kind: MMethod, containerName: "A"}
 		], ctx.documentSymbols());
 	}
 
 	/**
-	class Main {
-		static function main() {
-			var a = 12;
-			var b, c = 13;
-			var d = 1, e;
-			function f() { }
+		class Main {
+			static function main() {
+				var a = 12;
+				var b, c = 13;
+				var d = 1, e;
+				function f() { }
+			}
 		}
-	}
 	**/
 	function testExpression() {
 		checkDocumentSymbols([
-			{ name: "Main", kind: MClass, containerName: null },
-			{ name: "main", kind: MMethod, containerName: "Main" },
-			{ name: "a", kind: MVariable, containerName: "Main.main" },
-			{ name: "b", kind: MVariable, containerName: "Main.main" },
-			{ name: "c", kind: MVariable, containerName: "Main.main" },
-			{ name: "d", kind: MVariable, containerName: "Main.main" },
-			{ name: "e", kind: MVariable, containerName: "Main.main" },
-			{ name: "f", kind: MFunction, containerName: "Main.main" }
+			{name: "Main", kind: MClass, containerName: null},
+			{name: "main", kind: MMethod, containerName: "Main"},
+			{name: "a", kind: MVariable, containerName: "Main.main"},
+			{name: "b", kind: MVariable, containerName: "Main.main"},
+			{name: "c", kind: MVariable, containerName: "Main.main"},
+			{name: "d", kind: MVariable, containerName: "Main.main"},
+			{name: "e", kind: MVariable, containerName: "Main.main"},
+			{name: "f", kind: MFunction, containerName: "Main.main"}
 		], ctx.documentSymbols());
 	}
 
 	function checkDocumentSymbols(expected:Array<ModuleSymbolEntry>, actual:Array<ModuleSymbolEntry>, ?pos:haxe.PosInfos) {
 		arrayCheck(expected, actual, function(entry) return entry.kind + ":" + entry.name + ":" + entry.containerName, pos);
 	}
-}
+}

+ 9 - 8
tests/display/src/cases/IImport.hx

@@ -1,11 +1,12 @@
 package cases;
 
 import Types;
+
 using Lambda;
 
 class IImport extends DisplayTestCase {
 	/**
-	import ha{-1-}xe.{-6-}ma{-2-}cro.{-7-}Exp{-3-}rTools.{-8-}Expr{-4-}ArrayTools.{-9-}it{-5-}er;
+		import ha{-1-}xe.{-6-}ma{-2-}cro.{-7-}Exp{-3-}rTools.{-8-}Expr{-4-}ArrayTools.{-9-}it{-5-}er;
 	**/
 	function testImport1() {
 		eq(true, hasPath(fields(pos(2)), "Serializer"));
@@ -21,14 +22,14 @@ class IImport extends DisplayTestCase {
 	}
 
 	/**
-	import haxe.{-1-}
+		import haxe.{-1-}
 	**/
 	function testImport2() {
 		eq(true, hasPath(fields(pos(1)), "Serializer"));
 	}
 
 	/**
-	import haxe.Serializer.{-1-}
+		import haxe.Serializer.{-1-}
 	**/
 	function testImport3() {
 		eq(true, hasPath(fields(pos(1)), "run"));
@@ -36,7 +37,7 @@ class IImport extends DisplayTestCase {
 	}
 
 	/**
-	using ha{-1-}xe.{-5-}ma{-2-}cro.{-6-}Exp{-3-}rTools.{-7-}Expr{-4-}ArrayTools;
+		using ha{-1-}xe.{-5-}ma{-2-}cro.{-6-}Exp{-3-}rTools.{-7-}Expr{-4-}ArrayTools;
 	**/
 	function testUsing1() {
 		eq(true, hasPath(fields(pos(2)), "Serializer"));
@@ -50,14 +51,14 @@ class IImport extends DisplayTestCase {
 	}
 
 	/**
-	using haxe.{-1-}
+		using haxe.{-1-}
 	**/
 	function testUsing2() {
 		eq(true, hasPath(fields(pos(1)), "Serializer"));
 	}
 
 	/**
-	using haxe.Serializer.{-1-}
+		using haxe.Serializer.{-1-}
 	**/
 	function testUsing3() {
 		eq(false, hasPath(fields(pos(1)), "run"));
@@ -65,10 +66,10 @@ class IImport extends DisplayTestCase {
 	}
 
 	/**
-	import haxe.macro.{-1-}
+		import haxe.macro.{-1-}
 	**/
 	function testIssue6408() {
 		eq(true, hasPath(fields(pos(1)), "Context"));
 		eq(false, hasPath(fields(pos(1)), "Context.hl"));
 	}
-}
+}

+ 15 - 16
tests/display/src/cases/InMacro.hx

@@ -3,26 +3,26 @@ package cases;
 class InMacro extends DisplayTestCase {
 	/**
 
-	import haxe.macro.Context;
+		import haxe.macro.Context;
 
-	class Main {
+		class Main {
 
-		#if macro
+			#if macro
 
-		static function buildTypeDef( {-4-}t{-5-} : haxe.macro.Type ) : Expr {
-			Context.error("Unsupp{-1-}orted type "+Std.string({-2-}t{-3-}),Context.currentPos());
-			return null;
-		}
+			static function buildTypeDef( {-4-}t{-5-} : haxe.macro.Type ) : Expr {
+				Context.error("Unsupp{-1-}orted type "+Std.string({-2-}t{-3-}),Context.currentPos());
+				return null;
+			}
 
-		#else
+			#else
 
-		static function buildTypeDef( {-14-}t{-15-} : haxe.macro.Type) : Expr {
-			trace("not{-11-} a macro" + {-12-}t{-13-});
-			return null;
-		}
+			static function buildTypeDef( {-14-}t{-15-} : haxe.macro.Type) : Expr {
+				trace("not{-11-} a macro" + {-12-}t{-13-});
+				return null;
+			}
 
-		#end
-	}
+			#end
+		}
 	**/
 	function testMacro1() {
 		eq("String", type(pos(1)));
@@ -33,5 +33,4 @@ class InMacro extends DisplayTestCase {
 		arrayEq([range(12, 13)], usage(pos(14)));
 		eq(range(14, 15), position(pos(12)));
 	}
-
-}
+}

+ 21 - 21
tests/display/src/cases/Issue4155.hx

@@ -2,32 +2,32 @@ package cases;
 
 class Issue4155 extends DisplayTestCase {
 	/**
-	class Main {
-		macro static function m(e) {
-			trace(haxe.macro.ExprTools.toString(e));
-			return switch (e) {
-				case macro (null:{
+		class Main {
+			macro static function m(e) {
+				trace(haxe.macro.ExprTools.toString(e));
+				return switch (e) {
+					case macro (null:{
+						function dummy():Void {
+							$expr;
+						}
+					}):
+						expr;
+					case _: throw "invalid input";
+				}
+			}
+
+			@:debug.display
+			static function main() {
+				var v = m((null:{
 					function dummy():Void {
-						$expr;
+						"foo".{-1-}
 					}
-				}):
-					expr;
-				case _: throw "invalid input";
+				}));
+				trace(v);
 			}
 		}
-
-		@:debug.display
-		static function main() {
-			var v = m((null:{
-				function dummy():Void {
-					"foo".{-1-}
-				}
-			}));
-			trace(v);
-		}
-	}
 	**/
 	function test() {
 		eq(true, hasField(fields(pos(1)), "length", "Int"));
 	}
-}
+}

+ 20 - 20
tests/display/src/cases/Issue4345.hx

@@ -2,34 +2,34 @@ package cases;
 
 class Issue4345 extends DisplayTestCase {
 	/**
-	typedef DTag = Tag<DTag>;  // kind of a defeat, but OK..
-	typedef Tag1 = { tag: TagE<Tag1>, name: String, count: Int }
-	typedef Tag2 = { tag: TagE<Tag2>, name: String, brand: String, liters: Float};
+		typedef DTag = Tag<DTag>;  // kind of a defeat, but OK..
+		typedef Tag1 = { tag: TagE<Tag1>, name: String, count: Int }
+		typedef Tag2 = { tag: TagE<Tag2>, name: String, brand: String, liters: Float};
 
-	enum abstract TagE<T>(Int) {
-		var fruit:   TagE<Tag1> = 1;
-		var beverage:TagE<Tag2> = 2;
-	}
+		enum abstract TagE<T>(Int) {
+			var fruit:   TagE<Tag1> = 1;
+			var beverage:TagE<Tag2> = 2;
+		}
 
-	typedef Tag<T> = { tag:TagE<T> };
+		typedef Tag<T> = { tag:TagE<T> };
 
-	class Test {
+		class Test {
 
-		static var data : Array<Dynamic> =
-		[
-			{ tag: fruit,    name: "Apple",  count: 5 },
-			{ tag: fruit,    name: "Orange", count: 3 },
-			{ tag: beverage, name: "Sprite", brand: "Coca-Cola", liters: 2.5 }
-		];
+			static var data : Array<Dynamic> =
+			[
+				{ tag: fruit,    name: "Apple",  count: 5 },
+				{ tag: fruit,    name: "Orange", count: 3 },
+				{ tag: beverage, name: "Sprite", brand: "Coca-Cola", liters: 2.5 }
+			];
 
-		static function untag<T:Tag<T>>(t:T) switch t.tag {
-			case fruit:
-				t.{-1-}
-		}
+			static function untag<T:Tag<T>>(t:T) switch t.tag {
+				case fruit:
+					t.{-1-}
+			}
 	**/
 	function test() {
 		var fields = fields(pos(1));
 		eq(true, hasField(fields, "name", "String"));
 		eq(true, hasField(fields, "count", "Int"));
 	}
-}
+}

+ 15 - 15
tests/display/src/cases/Issue5141.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue5141 extends DisplayTestCase {
 	/**
-	typedef MyHandler = Int->String->Void
+		typedef MyHandler = Int->String->Void
 
-	class Some {
-		function main() {
-			var a:MyHandler;
-			a{-1-};
-			a({-2-}
+		class Some {
+			function main() {
+				var a:MyHandler;
+				a{-1-};
+				a({-2-}
+			}
 		}
-	}
 	**/
 	function testTypedef() {
 		eq("cases.MyHandler", type(pos(1)));
@@ -18,16 +18,16 @@ class Issue5141 extends DisplayTestCase {
 	}
 
 	/**
-	@:callable
-	abstract MyCallable(Int->String->Void) {}
+		@:callable
+		abstract MyCallable(Int->String->Void) {}
 
-	class Some {
-		function main() {
-			var a:MyCallable;
-			a{-1-};
-			a({-2-}
+		class Some {
+			function main() {
+				var a:MyCallable;
+				a{-1-};
+				a({-2-}
+			}
 		}
-	}
 	**/
 	function testAbstract() {
 		eq("cases.MyCallable", type(pos(1)));

+ 1 - 1
tests/display/src/cases/Issue5166.hx

@@ -11,4 +11,4 @@ class Issue5166 extends DisplayTestCase {
 		eq("cases.E", type(pos(2)));
 		eq(range(2, 1), position(pos(2)));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue5171.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue5171 extends DisplayTestCase {
 	/**
-	class {-2-}Main{-3-} {
-		static function main() {
-			Ma{-1-}in;
+		class {-2-}Main{-3-} {
+			static function main() {
+				Ma{-1-}in;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(2, 3), position(pos(1)));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue5172.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue5172 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			for ({-3-}i{-1-} in 0...10) {
-				{-4-}i{-2-};
+		class Main {
+			static function main() {
+				for ({-3-}i{-1-} in 0...10) {
+					{-4-}i{-2-};
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq("Int", type(pos(1)));
@@ -16,4 +16,4 @@ class Issue5172 extends DisplayTestCase {
 		eq(range(3, 1), position(pos(1)));
 		arrayEq([range(4, 2)], usage(pos(1)));
 	}
-}
+}

+ 7 - 7
tests/display/src/cases/Issue5173.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue5173 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			var map = new haxe.DynamicAccess();
-			for ({-3-}ke{-1-}y{-4-} in map.keys()) {
-				{-5-}ke{-2-}y{-6-};
+		class Main {
+			static function main() {
+				var map = new haxe.DynamicAccess();
+				for ({-3-}ke{-1-}y{-4-} in map.keys()) {
+					{-5-}ke{-2-}y{-6-};
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq("String", type(pos(1)));
@@ -19,4 +19,4 @@ class Issue5173 extends DisplayTestCase {
 		arrayEq([range(5, 6)], usage(pos(1)));
 		arrayEq([range(5, 6)], usage(pos(2)));
 	}
-}
+}

+ 4 - 4
tests/display/src/cases/Issue5649.hx

@@ -2,12 +2,12 @@ package cases;
 
 class Issue5649 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main():{-1-} {-2-} {}
-	}
+		class Main {
+			public static function main():{-1-} {-2-} {}
+		}
 	**/
 	function test() {
 		var typesCompletion = toplevel(pos(1));
 		eq(true, hasToplevel(typesCompletion, "type", "Array"));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue5684.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue5684 extends DisplayTestCase {
 	/**
-	abstract Test(String) {
-		public function hi(){
-			this.{-1-}
+		abstract Test(String) {
+			public function hi(){
+				this.{-1-}
+			}
 		}
-	}
 	**/
 	function testType1() {
 		// eq("Int", type(pos(1)));
 		eq(true, hasField(fields(pos(1)), "length", "Int"));
 	}
-}
+}

+ 9 - 9
tests/display/src/cases/Issue5712.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue5712 extends DisplayTestCase {
 	/**
-	typedef Struct = {
-		{-1-}field{-2-}:Float
-	}
-	class Main {
-		public static function main() {
-			var s:Struct = { fi{-3-}eld: 0 };
-			s.fi{-4-}eld;
+		typedef Struct = {
+			{-1-}field{-2-}:Float
+		}
+		class Main {
+			public static function main() {
+				var s:Struct = { fi{-3-}eld: 0 };
+				s.fi{-4-}eld;
+			}
 		}
-	}
 	**/
 	function testType1() {
 		eq(range(1, 2), position(pos(3)));
@@ -18,4 +18,4 @@ class Issue5712 extends DisplayTestCase {
 		eq("Float", type(pos(3))); // not sure about this one, maybe it should be Int...
 		eq("Float", type(pos(4)));
 	}
-}
+}

+ 10 - 10
tests/display/src/cases/Issue5729.hx

@@ -2,19 +2,19 @@ package cases;
 
 class Issue5729 extends DisplayTestCase {
 	/**
-	enum TestEnum {
-		Constructor(i:Int);
-	}
-	class Main {
-		public static function main() {
-			var c = Constructor(1);
-			switch (c) {
-				case Constructor(int{-1-}eger): trace("test");
+		enum TestEnum {
+			Constructor(i:Int);
+		}
+		class Main {
+			public static function main() {
+				var c = Constructor(1);
+				switch (c) {
+					case Constructor(int{-1-}eger): trace("test");
+				}
 			}
 		}
-	}
 	**/
 	function testType1() {
 		eq("Int", type(pos(1)));
 	}
-}
+}

+ 53 - 53
tests/display/src/cases/Issue5767.hx

@@ -4,43 +4,43 @@ import SignatureHelp;
 
 class Issue5767 extends DisplayTestCase {
 	/**
-	class Main {
-		static function doStuff(options:{a:Float, b:String}) {}
+		class Main {
+			static function doStuff(options:{a:Float, b:String}) {}
 
-		static function main () {
-			doStuff({ a: 0.5, {-1-}
+			static function main () {
+				doStuff({ a: 0.5, {-1-}
+			}
 		}
-	}
 	**/
 	function testGama11() {
 		eq(true, hasField(fields(pos(1)), "b", "String"));
 	}
 
 	/**
-	class Main {
-		static function doStuff(options:{a:Float, b:String}) {}
+		class Main {
+			static function doStuff(options:{a:Float, b:String}) {}
 
-		static function main () {
-			doStuff({ a: 0.5, {-1-}});
+			static function main () {
+				doStuff({ a: 0.5, {-1-}});
+			}
 		}
-	}
 	**/
 	function testGama11Intact() {
 		eq(true, hasField(fields(pos(1)), "b", "String"));
 	}
 
 	/**
-	typedef T = {
-		a:String,
-		b:Int,
-		c:Bool
-	}
+		typedef T = {
+			a:String,
+			b:Int,
+			c:Bool
+		}
 
-	class Main {
-		static function main() {
-			var c:T = {a:"foo", {-1-}
+		class Main {
+			static function main() {
+				var c:T = {a:"foo", {-1-}
+			}
 		}
-	}
 	**/
 	function testOrder() {
 		var fields = fields(pos(1));
@@ -49,61 +49,61 @@ class Issue5767 extends DisplayTestCase {
 	}
 
 	/**
-	typedef T1 = {
-		a:String,
-		b:T2
-	}
+		typedef T1 = {
+			a:String,
+			b:T2
+		}
 
-	typedef T2 = {
-		a:Bool,
-		b:Int
-	}
+		typedef T2 = {
+			a:Bool,
+			b:Int
+		}
 
-	class Main {
-		static function main() {
-			var c:T1 = {a:"foo", b: {b:1, {-1-}
+		class Main {
+			static function main() {
+				var c:T1 = {a:"foo", b: {b:1, {-1-}
+			}
 		}
-	}
 	**/
 	function testNested() {
 		eq(true, hasField(fields(pos(1)), "a", "Bool"));
 	}
 
 	/**
-	typedef T1<T> = {
-		a:String,
-		b:T2<T>
-	}
+		typedef T1<T> = {
+			a:String,
+			b:T2<T>
+		}
 
-	typedef T2<T> = {
-		a:T,
-		b:Int
-	}
+		typedef T2<T> = {
+			a:T,
+			b:Int
+		}
 
-	class Main {
-		static function main() {
-			var c:T1<Bool> = { b: { b:1, {-1-}
+		class Main {
+			static function main() {
+				var c:T1<Bool> = { b: { b:1, {-1-}
+			}
 		}
-	}
 	**/
 	function testFirstArg() {
 		eq(true, hasField(fields(pos(1)), "a", "Bool"));
 	}
 
 	/**
-	typedef T1<T> = {
-		a:String,
-		b:String,
-		c:String
-	}
+		typedef T1<T> = {
+			a:String,
+			b:String,
+			c:String
+		}
 
-	class Main {
-		static function main() {
-			var c:T1 = { a: "foo",{-1-} b: "bar" };
+		class Main {
+			static function main() {
+				var c:T1 = { a: "foo",{-1-} b: "bar" };
+			}
 		}
-	}
 	**/
 	function testIntact() {
 		eq(true, hasField(fields(pos(1)), "c", "String"));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue5775.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue5775 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main () {
-			var a = [];
-			trace('${a.{-1-}}');
+		class Main {
+			static function main () {
+				var a = [];
+				trace('${a.{-1-}}');
+			}
 		}
-	}
 	**/
 	function testType1() {
 		eq(true, hasField(fields(pos(1)), "length", "Int"));
 	}
-}
+}

+ 7 - 7
tests/display/src/cases/Issue5796.hx

@@ -2,16 +2,16 @@ package cases;
 
 class Issue5796 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {}
-	}
+		class Main {
+			static function main() {}
+		}
 
-	typedef Test = {
-		@:gen{-1-}eric var f{-2-}oo:Int;
-	}
+		typedef Test = {
+			@:gen{-1-}eric var f{-2-}oo:Int;
+		}
 	**/
 	function test() {
 		eq("Marks a class or class field as generic so each type parameter combination generates its own type/field", metadataDoc(pos(1)));
 		eq("Int", type(pos(2)));
 	}
-}
+}

+ 2 - 2
tests/display/src/cases/Issue5967.hx

@@ -2,8 +2,8 @@ package cases;
 
 class Issue5967 extends DisplayTestCase {
 	/**
-	function call():Void { };
-	call({-1-}a{-2-},{-3-},{-4-} {-5-}
+		function call():Void { };
+		call({-1-}a{-2-},{-3-},{-4-} {-5-}
 	**/
 	@:funcCode function test1() {
 		sigEq(0, [[]], signature(pos(1)));

+ 5 - 5
tests/display/src/cases/Issue5988.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue5988 extends DisplayTestCase {
 	/**
-	class Main {
-		static function f():Int;
+		class Main {
+			static function f():Int;
 
-		static function main() {
-			{-1-}
+			static function main() {
+				{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Array"));

+ 5 - 5
tests/display/src/cases/Issue5999.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue5999 extends DisplayTestCase {
 	/**
-	class Main {
-		static inline var {-1-}value{-2-} = 1;
+		class Main {
+			static inline var {-1-}value{-2-} = 1;
 
-		static public function main() {
-			trace(val{-3-}ue);
+			static public function main() {
+				trace(val{-3-}ue);
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 2), position(pos(3)));

+ 5 - 5
tests/display/src/cases/Issue6004.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue6004 extends DisplayTestCase {
 	/**
-	class Main {
-		static function f(a:Int) return a;
+		class Main {
+			static function f(a:Int) return a;
 
-		static function main() {
-			f.{-1-}
+			static function main() {
+				f.{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, hasField(fields(pos(1)), "bind", "((?a : Int) -> Int) -> ((?a : Int) -> Int)", "method"));

+ 10 - 10
tests/display/src/cases/Issue6020.hx

@@ -2,24 +2,24 @@ package cases;
 
 class Issue6020 extends DisplayTestCase {
 	/**
-	class C {
-		function g(s) {
-			(s : String);
-			s.{-1-}
+		class C {
+			function g(s) {
+				(s : String);
+				s.{-1-}
+			}
 		}
-	}
 	**/
 	function test1() {
 		eq(true, hasField(fields(pos(1)), "length", "Int"));
 	}
 
 	/**
-	class C {
-		function g(s) {
-			s = "foo";
-			s.{-1-}
+		class C {
+			function g(s) {
+				s = "foo";
+				s.{-1-}
+			}
 		}
-	}
 	**/
 	function test2() {
 		eq(true, hasField(fields(pos(1)), "length", "Int"));

+ 11 - 11
tests/display/src/cases/Issue6068.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue6068 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			var a:{i:Int};
-			a({-1-});
+		class Main {
+			static function main() {
+				var a:{i:Int};
+				a({-1-});
 
-			Main({-2-});
+				Main({-2-});
+			}
 		}
-	}
 	**/
 	function test() {
 		check(function() signature(pos(1)));
@@ -18,11 +18,11 @@ class Issue6068 extends DisplayTestCase {
 
 	function check(fn) {
 		var result = try {
-				fn();
-				false;
-			} catch (e:DisplayTestContext.HaxeInvocationException) {
-				e.message.indexOf("Not a callable type") != -1;
-			}
+			fn();
+			false;
+		} catch (e:DisplayTestContext.HaxeInvocationException) {
+			e.message.indexOf("Not a callable type") != -1;
+		}
 		assert(result);
 	}
 }

+ 9 - 9
tests/display/src/cases/Issue6227.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue6227 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-		new Foo(4) {-1-}> new Foo(3);
+		class Main {
+			public static function main() {
+			new Foo(4) {-1-}> new Foo(3);
+			}
 		}
-	}
 
-	abstract Foo({i:Int}) {
-		public function new(i) this = {i: i};
-		@:op(a > b) function f(other:Foo):String return "true";
-	}
+		abstract Foo({i:Int}) {
+			public function new(i) this = {i: i};
+			@:op(a > b) function f(other:Foo):String return "true";
+		}
 	**/
 	function test() {
 		eq("String", type(pos(1)));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue6265.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue6265 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main(x:Int):Void {
-			{-1-}trac{-2-}e{-3-}({-4-}'{-5-}${-6-}{{-7-}mai{-8-}n{-9-}({-10-}1{-11-}){-12-}}{-13-}') // lol
+		class Main {
+			public static function main(x:Int):Void {
+				{-1-}trac{-2-}e{-3-}({-4-}'{-5-}${-6-}{{-7-}mai{-8-}n{-9-}({-10-}1{-11-}){-12-}}{-13-}') // lol
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("(value : Dynamic) -> Void", type(pos(1)));
@@ -23,4 +23,4 @@ class Issue6265 extends DisplayTestCase {
 		eq("String", type(pos(12)));
 		eq("String", type(pos(13)));
 	}
-}
+}

+ 7 - 7
tests/display/src/cases/Issue6275.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue6275 extends DisplayTestCase {
 	/**
-	import haxe.ds.Option;
+		import haxe.ds.Option;
 
-	class Main {
-		static function main() {
-			{-1-}n{-2-}ew Main("foo"){-3-};
-		}
+		class Main {
+			static function main() {
+				{-1-}n{-2-}ew Main("foo"){-3-};
+			}
 
-		function {-4-}new{-5-}(s:String) {}
-	}
+			function {-4-}new{-5-}(s:String) {}
+		}
 	**/
 	function test() {
 		eq("(s : String) -> cases.Main", type(pos(2)));

+ 8 - 8
tests/display/src/cases/Issue6381.hx

@@ -2,17 +2,17 @@ package cases;
 
 class Issue6381 extends DisplayTestCase {
 	/**
-	import haxe.ds.Option;
+		import haxe.ds.Option;
 
-	class Main {
-		public static function main() {
-			switch (Some(Some("foo"))) {
-				case Some({-1-}in{-2-}ner{-3-} = Some(_)):
-					{-4-}inner{-5-};
-				case _:
+		class Main {
+			public static function main() {
+				switch (Some(Some("foo"))) {
+					case Some({-1-}in{-2-}ner{-3-} = Some(_)):
+						{-4-}inner{-5-};
+					case _:
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq("haxe.ds.Option<String>", type(pos(2)));

+ 7 - 7
tests/display/src/cases/Issue6396.hx

@@ -2,16 +2,16 @@ package cases;
 
 class Issue6396 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {}
+		class Main {
+			public static function main() {}
 
-		macro function foo() {
-			var {-1-}name{-2-} = "name";
-			return macro {
-				$na{-3-}me;
+			macro function foo() {
+				var {-1-}name{-2-} = "name";
+				return macro {
+					$na{-3-}me;
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 2), position(pos(3)));

+ 6 - 6
tests/display/src/cases/Issue6399.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue6399 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {}
+		class Main {
+			public static function main() {}
 
-		macro function foo({-1-}name{-2-}:String, {-3-}struct{-4-}:Expr, {-5-}defaults{-6-}:Expr) {
-			return macro {
-				if ($str{-7-}uct.$n{-8-}ame == null) $str{-9-}uct.$n{-10-}ame = $defa{-11-}ults.$n{-12-}ame;
+			macro function foo({-1-}name{-2-}:String, {-3-}struct{-4-}:Expr, {-5-}defaults{-6-}:Expr) {
+				return macro {
+					if ($str{-7-}uct.$n{-8-}ame == null) $str{-9-}uct.$n{-10-}ame = $defa{-11-}ults.$n{-12-}ame;
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		for (i in [8, 10, 12]) {

+ 9 - 9
tests/display/src/cases/Issue6405.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue6405 extends DisplayTestCase {
 	/**
-	import haxe.macro.Expr;
-	import haxe.macro.Context;
-	using haxe.macro.ExprTools;
+		import haxe.macro.Expr;
+		import haxe.macro.Context;
+		using haxe.macro.ExprTools;
 
-	class Macros {
+		class Macros {
 
-		public static macro function makeTypeDef( {-2-}e{-3-} : Expr ) {
-			var t = Context.getType({-1-}e{-5-}.{-4-}toString());
-			return macro {};
-		}
+			public static macro function makeTypeDef( {-2-}e{-3-} : Expr ) {
+				var t = Context.getType({-1-}e{-5-}.{-4-}toString());
+				return macro {};
+			}
 
-	}
+		}
 	**/
 	function test() {
 		eq(range(2, 3), position(pos(1)));

+ 7 - 7
tests/display/src/cases/Issue6416.hx

@@ -2,16 +2,16 @@ package cases;
 
 class Issue6416 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {}
+		class Main {
+			static function main() {}
 
-		macro function foo(e:haxe.macro.Expr) {
-			switch (e) {
-				case macro $i{{-1-}f{-2-}oo{-3-}}:
-					f{-4-}oo;
+			macro function foo(e:haxe.macro.Expr) {
+				switch (e) {
+					case macro $i{{-1-}f{-2-}oo{-3-}}:
+						f{-4-}oo;
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 3), position(pos(2)));

+ 5 - 5
tests/display/src/cases/Issue6417.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue6417 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {}
+		class Main {
+			static function main() {}
 
-		macro function foo({-1-}body{-2-}:Expr) {
-			macro function() $bo{-3-}dy;
+			macro function foo({-1-}body{-2-}:Expr) {
+				macro function() $bo{-3-}dy;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 2), position(pos(3)));

+ 9 - 9
tests/display/src/cases/Issue6421.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue6421 extends DisplayTestCase {
 	/**
-	using cases.Issue6421.Abstract;
+		using cases.Issue6421.Abstract;
 
-	abstract Abstract(Int) {
-		public function new(i) this = i;
-		public function foo():Void { }
-	}
+		abstract Abstract(Int) {
+			public function new(i) this = i;
+			public function foo():Void { }
+		}
 
-	class Main {
-		static function main() {
-			0.{-1-}
+		class Main {
+			static function main() {
+				0.{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(false, hasField(fields(pos(1)), "foo", "Void -> Void"));

+ 8 - 8
tests/display/src/cases/Issue6422.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue6422 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			pro{-1-}perty;
-		}
+		class Main {
+			static function main() {
+				pro{-1-}perty;
+			}
 
-		static var {-2-}property{-3-}(get, set):Int;
-		static function get_property() return 0;
-		static function set_property(i) return 0;
-	}
+			static var {-2-}property{-3-}(get, set):Int;
+			static function get_property() return 0;
+			static function set_property(i) return 0;
+		}
 	**/
 	function test() {
 		eq(range(2, 3), position(pos(1)));

+ 7 - 7
tests/display/src/cases/Issue6423.hx

@@ -2,16 +2,16 @@ package cases;
 
 class Issue6423 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {}
+		class Main {
+			static function main() {}
 
-		macro function foo(expr:haxe.macro.Expr, field:String) {
-			switch (expr) {
-				case macro $expr.{-1-}$fie{-2-}ld{-3-}:
-					expr;
+			macro function foo(expr:haxe.macro.Expr, field:String) {
+				switch (expr) {
+					case macro $expr.{-1-}$fie{-2-}ld{-3-}:
+						expr;
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 3), position(pos(2)));

+ 6 - 6
tests/display/src/cases/Issue6434.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue6434 extends DisplayTestCase {
 	/**
-	import misc.ModuleWithPrivateType;
+		import misc.ModuleWithPrivateType;
 
-	class Main {
-		static function main() {
-			{-1-}
+		class Main {
+			static function main() {
+				{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		var toplevel = toplevel(pos(1));
@@ -17,4 +17,4 @@ class Issue6434 extends DisplayTestCase {
 		// to test what I want to test...
 		eq(false, hasToplevel(toplevel, "type", "PrivateClass"));
 	}
-}
+}

+ 3 - 3
tests/display/src/cases/Issue6442.hx

@@ -2,9 +2,9 @@ package cases;
 
 class Issue6442 extends DisplayTestCase {
 	/**
-	extern class Foo {
-		function {-1-}b{-2-}ar{-3-}():Void;
-	}
+		extern class Foo {
+			function {-1-}b{-2-}ar{-3-}():Void;
+		}
 	**/
 	function test() {
 		eq(range(1, 3), position(pos(2)));

+ 13 - 13
tests/display/src/cases/Issue6740.hx

@@ -2,25 +2,25 @@ package cases;
 
 class Issue6740 extends DisplayTestCase {
 	/**
-	class A {
-		function new(v:Array<String>) {
+		class A {
+			function new(v:Array<String>) {
+			}
 		}
-	}
 
-	class Main extends A {
+		class Main extends A {
 
-		function new(v) {
-			super(v);
-			v.{-1-}
-		}
+			function new(v) {
+				super(v);
+				v.{-1-}
+			}
 
-		static function main() {
-			new Main();
-		}
+			static function main() {
+				new Main();
+			}
 
-	}
+		}
 	**/
 	function test() {
 		eq(true, hasField(fields(pos(1)), "concat", "(a : Array<String>) -> Array<String>"));
 	}
-}
+}

+ 4 - 4
tests/display/src/cases/Issue6756.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue6756 extends DisplayTestCase {
 	/**
-	abstract Result(String) {
-	    function f{-1-}oo() {}
-	}
+		abstract Result(String) {
+			function f{-1-}oo() {}
+		}
 	**/
 	function test() {
 		eq("Void -> Void", type(pos(1)));
 	}
-}
+}

+ 8 - 8
tests/display/src/cases/Issue6779.hx

@@ -2,17 +2,17 @@ package cases;
 
 class Issue6779 extends DisplayTestCase {
 	/**
-	class Some {
-		static function f():Void {}
-	}
+		class Some {
+			static function f():Void {}
+		}
 
-	class Main {
-		static function main() {
-			@:privateAccess Some.{-1-}
+		class Main {
+			static function main() {
+				@:privateAccess Some.{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, hasField(fields(pos(1)), "f", "Void -> Void", "method"));
 	}
-}
+}

+ 9 - 9
tests/display/src/cases/Issue6923.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue6923 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			trace({-1-}"test{-2-}".{-3-}lengt{-4-}h{-5-});
+		class Main {
+			static function main() {
+				trace({-1-}"test{-2-}".{-3-}lengt{-4-}h{-5-});
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("String", type(pos(1)));
@@ -17,12 +17,12 @@ class Issue6923 extends DisplayTestCase {
 	}
 
 	/**
-	class Main {
-		static function main() {
-			var a = 1;
-			{-1-}a{-2-}+{-3-}0{-4-}.{-5-}1;
+		class Main {
+			static function main() {
+				var a = 1;
+				{-1-}a{-2-}+{-3-}0{-4-}.{-5-}1;
+			}
 		}
-	}
 	**/
 	function test2() {
 		eq("Int", type(pos(1)));

+ 4 - 4
tests/display/src/cases/Issue6943.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue6943 extends DisplayTestCase {
 	/**
-class Main {
-    public static function main() {}
+		class Main {
+		public static function main() {}
 
-    function foo(?{-1-}te{-2-}st{-3-}:Int) {}
-}
+		function foo(?{-1-}te{-2-}st{-3-}:Int) {}
+		}
 	**/
 	function test() {
 		eq(range(1, 3), position(pos(2)));

+ 9 - 9
tests/display/src/cases/Issue6951.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue6951 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-			new Test<"{-1-}">().foo();
+		class Main {
+			public static function main() {
+				new Test<"{-1-}">().foo();
+			}
 		}
-	}
 
-	@:generic class Test<@:const T> {
-		public function new() {}
-		public function foo() {
-			trace(T);
+		@:generic class Test<@:const T> {
+			public function new() {}
+			public function foo() {
+				trace(T);
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("String", type(pos(1)));

+ 2 - 2
tests/display/src/cases/Issue6997.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue6997 extends DisplayTestCase {
 	/**
-	"".lastIndexOf.bind({-1-}
+		"".lastIndexOf.bind({-1-}
 	**/
 	@:funcCode function test1() {
 		sigEq(0, [["str:String", "?startIndex:Null<Int>"]], signature(pos(1)));
 	}
 
 	/**
-	"".lastIndexOf.bind("foo", {-1-}
+		"".lastIndexOf.bind("foo", {-1-}
 	**/
 	@:funcCode function test2() {
 		sigEq(1, [["str:String", "?startIndex:Null<Int>"]], signature(pos(1)));

+ 5 - 5
tests/display/src/cases/Issue7020.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7020 extends DisplayTestCase {
 	/**
-	import String as {-2-}ExprAc{-4-}cess{-3-};
+		import String as {-2-}ExprAc{-4-}cess{-3-};
 
-	class Main {
-		public static function main() {
-			var access:ExprA{-1-}ccess;
+		class Main {
+			public static function main() {
+				var access:ExprA{-1-}ccess;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(2, 3), position(pos(1)));

+ 5 - 5
tests/display/src/cases/Issue7022.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7022 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {}
+		class Main {
+			public static function main() {}
 
-		public function ne{-1-}w() {
-			new Main();
+			public function ne{-1-}w() {
+				new Main();
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("Void -> cases.Main", type(pos(1)));

+ 4 - 4
tests/display/src/cases/Issue7023.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue7023 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-			inl{-1-}ine funct{-2-}ion fo{-3-}o() return "foo";
+		class Main {
+			public static function main() {
+				inl{-1-}ine funct{-2-}ion fo{-3-}o() return "foo";
+			}
 		}
-	}
 	**/
 	function test() {
 		// eq("Void -> String", type(pos(1)));

+ 2 - 2
tests/display/src/cases/Issue7027.hx

@@ -2,8 +2,8 @@ package cases;
 
 class Issue7027 extends DisplayTestCase {
 	/**
-	import haxe.macro.Expr.ExprDef.{-1-}
-	}
+		import haxe.macro.Expr.ExprDef.{-1-}
+		}
 	**/
 	function test() {
 		eq(true, hasField(fields(pos(1)), "EBreak", "haxe.macro.ExprDef"));

+ 41 - 41
tests/display/src/cases/Issue7029.hx

@@ -2,9 +2,9 @@ package cases;
 
 class Issue7029 extends DisplayTestCase {
 	/**
-	class C implements {-1-}
+		class C implements {-1-}
 
-	interface IFoo { }
+		interface IFoo { }
 	**/
 	function test1() {
 		var typesCompletion = toplevel(pos(1));
@@ -13,10 +13,10 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	class C1 extends {-1-}
+		class C1 extends {-1-}
 
-	class C2 { }
-	interface IFoo { }
+		class C2 { }
+		interface IFoo { }
 	**/
 	function test2() {
 		var typesCompletion = toplevel(pos(1));
@@ -26,9 +26,9 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	class C { }
-	interface IFoo { }
-	interface IFoo2 extends {-1-} { }
+		class C { }
+		interface IFoo { }
+		interface IFoo2 extends {-1-} { }
 	**/
 	function test3() {
 		var typesCompletion = toplevel(pos(1));
@@ -38,12 +38,12 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	typedef T1 = { };
-	class C1 { }
+		typedef T1 = { };
+		class C1 { }
 
-	typedef T2 = {
-		> {-1-}
-	}
+		typedef T2 = {
+			> {-1-}
+		}
 	**/
 	function test4() {
 		var typesCompletion = toplevel(pos(1));
@@ -52,12 +52,12 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	typedef T1 = { };
-	class C1 { }
+		typedef T1 = { };
+		class C1 { }
 
-	typedef T2 = {
-		> T{-1-}
-	}
+		typedef T2 = {
+			> T{-1-}
+		}
 	**/
 	function test5() {
 		var typesCompletion = toplevel(pos(1));
@@ -66,14 +66,14 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	typedef T1 = { };
-	typedef T2 = { };
-	class C1 { }
+		typedef T1 = { };
+		typedef T2 = { };
+		class C1 { }
 
-	typedef T3 = {
-		> T1,
-		> {-1-}
-	}
+		typedef T3 = {
+			> T1,
+			> {-1-}
+		}
 	**/
 	function test6() {
 		var typesCompletion = toplevel(pos(1));
@@ -82,20 +82,20 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	interface I1 {}
-	typedef T1 = {};
-	enum E1 {}
-	class C1 {
-		public function new() { }
-	}
-
-	class C2 {
-		static function main() {
-			new{-1-}   {-2-}
+		interface I1 {}
+		typedef T1 = {};
+		enum E1 {}
+		class C1 {
+			public function new() { }
 		}
 
-		public function new() { }
-	}
+		class C2 {
+			static function main() {
+				new{-1-}   {-2-}
+			}
+
+			public function new() { }
+		}
 	**/
 	function test7() {
 		var typesCompletion = toplevel(pos(1));
@@ -114,8 +114,8 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	final class C1 { }
-	class C2 extends {-1-} { }
+		final class C1 { }
+		class C2 extends {-1-} { }
 	**/
 	function test8() {
 		var typesCompletion = toplevel(pos(1));
@@ -123,8 +123,8 @@ class Issue7029 extends DisplayTestCase {
 	}
 
 	/**
-	final class C1 { }
-	@:hack class C2 extends {-1-} { }
+		final class C1 { }
+		@:hack class C2 extends {-1-} { }
 	**/
 	function test9() {
 		var typesCompletion = toplevel(pos(1));

+ 3 - 3
tests/display/src/cases/Issue7046.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue7046 extends DisplayTestCase {
 	/**
-	import Ar{-1-}ray;
-	using Ar{-2-}ray;
+		import Ar{-1-}ray;
+		using Ar{-2-}ray;
 	**/
 	function test() {
 		eq("Array<Array.T>", type(pos(1)));
 		eq("Array<Array.T>", type(pos(2)));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7047.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7047 extends DisplayTestCase {
 	/**
-	class Main {
-		var f:Void->{-1-}
+		class Main {
+			var f:Void->{-1-}
 
-		static function main() {}
-	}
+			static function main() {}
+		}
 	**/
 	function test() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Array"));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7050.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7050 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			// {-1-}
+		class Main {
+			static function main() {
+				// {-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, noCompletionPoint(toplevel.bind(pos(1))));
 	}
-}
+}

+ 18 - 18
tests/display/src/cases/Issue7051.hx

@@ -2,24 +2,24 @@ package cases;
 
 class Issue7051 extends DisplayTestCase {
 	/**
-	class CWithCtor {
-		public function new() { }
-	}
-	class CInheritedCtor extends CWithCtor { }
-	class CInheritedCtor2 extends CInheritedCtor { }
-	class CNoCtor { }
-	class CNoCtor2 extends CNoCtor { }
+		class CWithCtor {
+			public function new() { }
+		}
+		class CInheritedCtor extends CWithCtor { }
+		class CInheritedCtor2 extends CInheritedCtor { }
+		class CNoCtor { }
+		class CNoCtor2 extends CNoCtor { }
 
-	abstract AWithCtor(String) {
-		public function new() this = "";
-	}
-	abstract AWithoutCtor(String) { }
+		abstract AWithCtor(String) {
+			public function new() this = "";
+		}
+		abstract AWithoutCtor(String) { }
 
-	class Main {
-		static function main() {
-			new {-1-}
+		class Main {
+			static function main() {
+				new {-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		var toplevel = toplevel(pos(1));
@@ -34,10 +34,10 @@ class Issue7051 extends DisplayTestCase {
 	}
 
 	/**
-	new {-1-}
-	call();
+		new {-1-}
+		call();
 	**/
 	@:funcCode function testBroken() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Array"));
 	}
-}
+}

+ 52 - 24
tests/display/src/cases/Issue7053.hx

@@ -2,36 +2,42 @@ package cases;
 
 class Issue7053 extends DisplayTestCase {
 	/**
-	{-1-}
+		{-1-}
 	**/
 	function testFull() {
 		var fields = toplevel(pos(1));
 		// technically, "package" should be here too. But I think the test system adds a
 		// package statement automatically, so it is omitted.
-		for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 	}
 
 	/**
-	i{-1-}
+		i{-1-}
 	**/
 	function testFullIdent() {
 		var fields = toplevel(pos(1));
 		// technically, "package" should be here too. But I think the test system adds a
 		// package statement automatically, so it is omitted.
-		for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 	}
 
 	/**
-	import String;
-	{-1-}
+		import String;
+		{-1-}
 	**/
 	function testAfterImport() {
 		var fields = toplevel(pos(1));
-		for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 		for (unexpected in ["package"]) {
@@ -40,12 +46,14 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	import String;
-	i{-1-}
+		import String;
+		i{-1-}
 	**/
 	function testAfterImportIdent() {
 		var fields = toplevel(pos(1));
-		for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 		for (unexpected in ["package"]) {
@@ -54,12 +62,21 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	class C { }
-	{-1-}
+		class C { }
+		{-1-}
 	**/
 	function testAfterClass() {
 		var fields = toplevel(pos(1));
-		for (expected in ["private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"private",
+			"extern",
+			"class",
+			"interface",
+			"enum",
+			"abstract",
+			"typedef",
+			"final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 		for (unexpected in ["import", "using", "package"]) {
@@ -68,12 +85,21 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	class C { }
-	i{-1-}
+		class C { }
+		i{-1-}
 	**/
 	function testAfterClassIdent() {
 		var fields = toplevel(pos(1));
-		for (expected in ["private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"private",
+			"extern",
+			"class",
+			"interface",
+			"enum",
+			"abstract",
+			"typedef",
+			"final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 		for (unexpected in ["import", "using", "package"]) {
@@ -82,19 +108,21 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	{-1-}class
+		{-1-}class
 	**/
 	function testOnClass() {
 		var fields = toplevel(pos(1));
 		// technically, "package" should be here too. But I think the test system adds a
 		// package statement automatically, so it is omitted.
-		for (expected in ["import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"]) {
+		for (expected in [
+			"import", "using", "private", "extern", "class", "interface", "enum", "abstract", "typedef", "final"
+		]) {
 			eq(true, hasField(fields, expected, null, "keyword"));
 		}
 	}
 
 	/**
-	private {-1-}
+		private {-1-}
 	**/
 	function testAfterPrivate() {
 		var fields = toplevel(pos(1));
@@ -107,7 +135,7 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	extern {-1-}
+		extern {-1-}
 	**/
 	function testAFterExtern() {
 		var fields = toplevel(pos(1));
@@ -120,7 +148,7 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	final {-1-}
+		final {-1-}
 	**/
 	function testAFterFinal() {
 		var fields = toplevel(pos(1));
@@ -133,7 +161,7 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	final extern {-1-}
+		final extern {-1-}
 	**/
 	function testAFterFinalExtern() {
 		var fields = toplevel(pos(1));
@@ -146,7 +174,7 @@ class Issue7053 extends DisplayTestCase {
 	}
 
 	/**
-	{-1-}
+		{-1-}
 	**/
 	@:filename("import.hx")
 	function testInImportHx() {
@@ -157,4 +185,4 @@ class Issue7053 extends DisplayTestCase {
 		}
 		eq(expectedKeywords.length, keywords.length);
 	}
-}
+}

+ 14 - 14
tests/display/src/cases/Issue7055.hx

@@ -2,22 +2,22 @@ package cases;
 
 class Issue7055 extends DisplayTestCase {
 	/**
-	enum TestEnum {
-		Some;
-		Random;
-		Enum;
-		Constructors;
-		For;
-		Testing;
-	}
+		enum TestEnum {
+			Some;
+			Random;
+			Enum;
+			Constructors;
+			For;
+			Testing;
+		}
 
-	class Main {
-		static function main() {
-			switch ((null:TestEnum)) {
-				case {-1-}
+		class Main {
+			static function main() {
+				switch ((null:TestEnum)) {
+					case {-1-}
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		var results = toplevel(pos(1));
@@ -32,4 +32,4 @@ class Issue7055 extends DisplayTestCase {
 		nextIs("For");
 		nextIs("Testing");
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue7057.hx

@@ -2,16 +2,16 @@ package cases;
 
 class Issue7057 extends DisplayTestCase {
 	/**
-	import haxe.Constraints.Constructible;
+		import haxe.Constraints.Constructible;
 
-	class Main {
-		@:generic static function main<T, TConstructible:Constructible<Void->Void>>() {
-			new {-1-}
+		class Main {
+			@:generic static function main<T, TConstructible:Constructible<Void->Void>>() {
+				new {-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(false, hasToplevel(toplevel(pos(1)), "type", "T"));
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "TConstructible"));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7059.hx

@@ -4,13 +4,13 @@ using Lambda;
 
 class Issue7059 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			{-1-}
+		class Main {
+			static function main() {
+				{-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, toplevel(pos(1)).exists(el -> el.name == "trace"));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7060.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7060 extends DisplayTestCase {
 	/**
-	import Type.Valu{-1-}eType;
+		import Type.Valu{-1-}eType;
 
-	class Main {
-		static function main() {}
-	}
+		class Main {
+			static function main() {}
+		}
 	**/
 	function test() {
 		eq("ValueType", type(pos(1)));
 	}
-}
+}

+ 18 - 18
tests/display/src/cases/Issue7061.hx

@@ -2,25 +2,25 @@ package cases;
 
 class Issue7061 extends DisplayTestCase {
 	/**
-	abstract Either<A, B>(EitherImpl<A, B>) {
-		function new(value) this = value;
-		@:from static function fromA<A,B>(value:A) return new Either(a(value));
-		@:from static function fromB<A,B>(value:B) return new Either(b(value));
-	}
+		abstract Either<A, B>(EitherImpl<A, B>) {
+			function new(value) this = value;
+			@:from static function fromA<A,B>(value:A) return new Either(a(value));
+			@:from static function fromB<A,B>(value:B) return new Either(b(value));
+		}
 
-	enum EitherImpl<A, B> {
-		a(v:A);
-		b(v:B);
-	}
+		enum EitherImpl<A, B> {
+			a(v:A);
+			b(v:B);
+		}
 
-	class Main {
-		static function main() {}
-		function new() f{-6-}oo(b{-1-}ar);
-		function notNew() foo(b{-7-}ar2);
-		function {-2-}foo{-3-}<T>(value:Either<Void->T,Void->Void>) {}
-		function {-4-}bar{-5-}() {}
-		function bar2() return 1;
-	}
+		class Main {
+			static function main() {}
+			function new() f{-6-}oo(b{-1-}ar);
+			function notNew() foo(b{-7-}ar2);
+			function {-2-}foo{-3-}<T>(value:Either<Void->T,Void->Void>) {}
+			function {-4-}bar{-5-}() {}
+			function bar2() return 1;
+		}
 	**/
 	function test() {
 		eq(range(4, 5), position(pos(1)));
@@ -28,4 +28,4 @@ class Issue7061 extends DisplayTestCase {
 		eq("Void -> Void", type(pos(1)));
 		eq("Void -> Int", type(pos(7)));
 	}
-}
+}

+ 9 - 9
tests/display/src/cases/Issue7063.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7063 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-			call({
-				foo: 1,{-1-}
-			});
-		}
+		class Main {
+			public static function main() {
+				call({
+					foo: 1,{-1-}
+				});
+			}
 
-		static function call(arg1:Dynamic, arg2:Int) { }
-	}
+			static function call(arg1:Dynamic, arg2:Int) { }
+		}
 	**/
 	function test() {
 		// assumes wasAutoTriggered = false, update test for new protocol
 		sigEq(0, [["arg1:Dynamic", "arg2:Int"]], signature(pos(1)));
 	}
-}
+}

+ 13 - 13
tests/display/src/cases/Issue7066.hx

@@ -2,20 +2,20 @@ package cases;
 
 class Issue7066 extends DisplayTestCase {
 	/**
-	typedef Struct = {
-		?fieldA:Int,
-		?fieldB:String
-	}
+		typedef Struct = {
+			?fieldA:Int,
+			?fieldB:String
+		}
 
-	class Main {
-		static function main() {}
-		function foo():Struct {
-			return {
-				fieldA: 5,
-				{-1-}
-			};
+		class Main {
+			static function main() {}
+			function foo():Struct {
+				return {
+					fieldA: 5,
+					{-1-}
+				};
+			}
 		}
-	}
 	**/
 	function test() {
 		var results = fields(pos(1));
@@ -24,4 +24,4 @@ class Issue7066 extends DisplayTestCase {
 		eq("var", results[0].kind);
 		eq("Null<String>", results[0].type);
 	}
-}
+}

+ 13 - 13
tests/display/src/cases/Issue7068.hx

@@ -2,32 +2,32 @@ package cases;
 
 class Issue7068 extends DisplayTestCase {
 	/**
-	enum Foo { Bar; }
+		enum Foo { Bar; }
 
-	class Main {
-		static function main() {
-			switch ((null:Foo)) {
-				case {-1-} if (false):
+		class Main {
+			static function main() {
+				switch ((null:Foo)) {
+					case {-1-} if (false):
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		eq("Bar", toplevel(pos(1))[0].name);
 	}
 
 	/**
-	enum Foo { Bar; }
+		enum Foo { Bar; }
 
-	class Main {
-		static function main() {
-			switch ((null:Foo)) {
-				case Bar | {-1-} if (false):
+		class Main {
+			static function main() {
+				switch ((null:Foo)) {
+					case Bar | {-1-} if (false):
+				}
 			}
 		}
-	}
 	**/
 	function test2() {
 		eq("Bar", toplevel(pos(1))[0].name);
 	}
-}
+}

+ 10 - 10
tests/display/src/cases/Issue7069.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7069 extends DisplayTestCase {
 	/**
-	class Main {
-		static var field:Int;
-		static function main(argument:Int) {
-			var local:Int;
-			{
-				var blockLocal:Int;
-				for (i in 0...10) {
-					{-1-}
+		class Main {
+			static var field:Int;
+			static function main(argument:Int) {
+				var local:Int;
+				{
+					var blockLocal:Int;
+					for (i in 0...10) {
+						{-1-}
+					}
 				}
 			}
 		}
-	}
 	**/
 	function test() {
 		var results = toplevel(pos(1));
@@ -23,4 +23,4 @@ class Issue7069 extends DisplayTestCase {
 		eq("argument", results[3].name);
 		eq("field", results[4].name);
 	}
-}
+}

+ 8 - 8
tests/display/src/cases/Issue7071.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7071 extends DisplayTestCase {
 	/**
-	enum Foo { Bar; }
+		enum Foo { Bar; }
 
-	class Main {
-		public static function main() {
-			var bar = Bar;
-			bar == {-1-};
-			if (bar == {-2-})
+		class Main {
+			public static function main() {
+				var bar = Bar;
+				bar == {-1-};
+				if (bar == {-2-})
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("bar", toplevel(pos(1))[0].name);
 		eq("bar", toplevel(pos(2))[0].name);
 	}
-}
+}

+ 11 - 11
tests/display/src/cases/Issue7072.hx

@@ -2,19 +2,19 @@ package cases;
 
 class Issue7072 extends DisplayTestCase {
 	/**
-	typedef Struct = {
-		var foo:Int;
-		var bar:Int;
-		var foobar:Int;
-	}
+		typedef Struct = {
+			var foo:Int;
+			var bar:Int;
+			var foobar:Int;
+		}
 
-	class Main {
-		public static function main() {
-			var s:Struct = {
-				{-1-}
+		class Main {
+			public static function main() {
+				var s:Struct = {
+					{-1-}
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		var results = fields(pos(1));
@@ -24,4 +24,4 @@ class Issue7072 extends DisplayTestCase {
 		// eq("foobar", results[2].name);
 		eq(true, true); // TODO
 	}
-}
+}

+ 9 - 9
tests/display/src/cases/Issue7075.hx

@@ -2,25 +2,25 @@ package cases;
 
 class Issue7075 extends DisplayTestCase {
 	/**
-	import hax{-1-}
+		import hax{-1-}
 
-	class Main {
-		static function main() {}
-	}
+		class Main {
+			static function main() {}
+		}
 	**/
 	function test1() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "CallStack"));
 	}
 
 	/**
-	import haxe.d{-1-}
+		import haxe.d{-1-}
 
-	class Main {
-		static function main() {}
-	}
+		class Main {
+			static function main() {}
+		}
 	**/
 	function test2() {
 		var fields = fields(pos(1));
 		eq(true, hasField(fields, "CallStack", ""));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue7082.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue7082 extends DisplayTestCase {
 	/**
-	class Main extends haxe.ds.BalancedTree {
-		override {-1-}
-		var foo:Int;
+		class Main extends haxe.ds.BalancedTree {
+			override {-1-}
+			var foo:Int;
 
-		static function main() {}
-	}
+			static function main() {}
+		}
 	**/
 	function test() {
 		fields(pos(1));
 		eq(true, true); // TODO
 	}
-}
+}

+ 16 - 16
tests/display/src/cases/Issue7084.hx

@@ -2,33 +2,33 @@ package cases;
 
 class Issue7084 extends DisplayTestCase {
 	/**
-	enum abstract Foo(Int) {
-		var Value = 0;
-	}
+		enum abstract Foo(Int) {
+			var Value = 0;
+		}
 
-	class Main {
-		public static function main() {
-			var f:Foo;
-			f.{-1-}
+		class Main {
+			public static function main() {
+				var f:Foo;
+				f.{-1-}
+			}
 		}
-	}
 	**/
 	function test1() {
 		eq(0, fields(pos(1)).length);
 	}
 
 	/**
-	enum abstract Foo(Int) {
-		var Value = 0;
-	}
+		enum abstract Foo(Int) {
+			var Value = 0;
+		}
 
-	class Main {
-		public static function main() {
-			Foo.{-1-};
+		class Main {
+			public static function main() {
+				Foo.{-1-};
+			}
 		}
-	}
 	**/
 	function test2() {
 		eq("Value", fields(pos(1))[0].name);
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7086.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7086 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-			~/{-1-}/;
+		class Main {
+			public static function main() {
+				~/{-1-}/;
+			}
 		}
-	}
 	**/
 	function test() {
 		assert(noCompletionPoint(toplevel.bind(pos(1))));
 	}
-}
+}

+ 8 - 8
tests/display/src/cases/Issue7089.hx

@@ -2,17 +2,17 @@ package cases;
 
 class Issue7089 extends DisplayTestCase {
 	/**
-	enum abstract Foo(Int) {
-		var Value = 1;
-	}
+		enum abstract Foo(Int) {
+			var Value = 1;
+		}
 
-	class Main {
-		static function main() {
-			Fo{-1-}o;
+		class Main {
+			static function main() {
+				Fo{-1-}o;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("Abstract<cases.Foo>", type(pos(1)));
 	}
-}
+}

+ 8 - 8
tests/display/src/cases/Issue7092.hx

@@ -2,17 +2,17 @@ package cases;
 
 class Issue7092 extends DisplayTestCase {
 	/**
-	class Main {
-		public static function main() {
-			new {-1-}
+		class Main {
+			public static function main() {
+				new {-1-}
+			}
 		}
-	}
 
-	private class PrivateClass {
-		public function new() {}
-	}
+		private class PrivateClass {
+			public function new() {}
+		}
 	**/
 	function test() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "PrivateClass"));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue7098.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue7098 extends DisplayTestCase {
 	/**
-	import misc.issue7098.Bar;
-	class Main {
-		public static function main() {
-			Bar.foo(Va{-1-}lue);
+		import misc.issue7098.Bar;
+		class Main {
+			public static function main() {
+				Bar.foo(Va{-1-}lue);
+			}
 		}
-	}
 	**/
 	function test() {
 		var pos = position(pos(1));
 		eq("Bar.hx:4: characters 6-11", pos.substr(-25));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue7102.hx

@@ -2,14 +2,14 @@ package cases;
 
 class Issue7102 extends DisplayTestCase {
 	/**
-	import haxe.Constraints.Constructible;
-	class Main {
-		@:generic static function main<T, TConstructible:Constructible<Void->Void>>() {
-			new TConstructible({-1-});
+		import haxe.Constraints.Constructible;
+		class Main {
+			@:generic static function main<T, TConstructible:Constructible<Void->Void>>() {
+				new TConstructible({-1-});
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(0, signature(pos(1)).signatures[0].parameters.length);
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7111.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7111 extends DisplayTestCase {
 	/**
-	class {-1-}Main{-2-}<T> {
-		public static function main() {
-			var a:Ma{-3-}in<>
+		class {-1-}Main{-2-}<T> {
+			public static function main() {
+				var a:Ma{-3-}in<>
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 2), position(pos(3)));
 	}
-}
+}

+ 6 - 6
tests/display/src/cases/Issue7133.hx

@@ -2,15 +2,15 @@ package cases;
 
 class Issue7133 extends DisplayTestCase {
 	/**
-	import haxe.ds.Option;
+		import haxe.ds.Option;
 
-	class Main {
-		public static function main() {
-			var option:Option<Int> = if (true) No{-1-}ne else
+		class Main {
+			public static function main() {
+				var option:Option<Int> = if (true) No{-1-}ne else
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(true, position(pos(1)) != null);
 	}
-}
+}

+ 10 - 10
tests/display/src/cases/Issue7136.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7136 extends DisplayTestCase {
 	/**
-	@:structInit class Point<T> {
-		var x:Int;
-		var y:T;
-	}
+		@:structInit class Point<T> {
+			var x:Int;
+			var y:T;
+		}
 
-	class Main {
-		static function main() {
-			var p:Point<String> = {
-				{-1-}
+		class Main {
+			static function main() {
+				var p:Point<String> = {
+					{-1-}
+				}
 			}
 		}
-	}
 	**/
 	function test() {
 		var fields = fields(pos(1));
@@ -22,4 +22,4 @@ class Issue7136 extends DisplayTestCase {
 		eq("y", fields[1].name);
 		eq("String", fields[1].type);
 	}
-}
+}

+ 10 - 10
tests/display/src/cases/Issue7137.hx

@@ -2,12 +2,12 @@ package cases;
 
 class Issue7137 extends DisplayTestCase {
 	/**
-	abstract Foo1(Int) from {-1-} {}
-	abstract Foo2(Int) to {-2-} {}
+		abstract Foo1(Int) from {-1-} {}
+		abstract Foo2(Int) to {-2-} {}
 
-	class Main {
-		static function main() {}
-	}
+		class Main {
+			static function main() {}
+		}
 	**/
 	function test1() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Float"));
@@ -15,18 +15,18 @@ class Issue7137 extends DisplayTestCase {
 	}
 
 	/**
-	abstract Foo1(Int) from {-1-}
+		abstract Foo1(Int) from {-1-}
 	**/
 	function test2() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Float"));
 	}
 
 	/**
-	abstract Foo1(Int) from {-1-} {
-		public function new() { }
-	}
+		abstract Foo1(Int) from {-1-} {
+			public function new() { }
+		}
 	**/
 	function test3() {
 		eq(true, hasToplevel(toplevel(pos(1)), "type", "Float"));
 	}
-}
+}

+ 8 - 8
tests/display/src/cases/Issue7148.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7148 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			function {-1-}local{-2-}() {}
-			lo{-3-}cal;
+		class Main {
+			static function main() {
+				function {-1-}local{-2-}() {}
+				lo{-3-}cal;
 
-			inline function {-4-}local{-5-}() {}
-			lo{-6-}cal;
+				inline function {-4-}local{-5-}() {}
+				lo{-6-}cal;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(1, 2), position(pos(3)));
 		eq(range(4, 5), position(pos(6)));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7158.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7158 extends DisplayTestCase {
 	/**
-	class {-2-}Main{-3-} {
-		static function main() {
-			var s:Mai{-1-}n<T>;
+		class {-2-}Main{-3-} {
+			static function main() {
+				var s:Mai{-1-}n<T>;
+			}
 		}
-	}
 	**/
 	function test() {
 		eq(range(2, 3), position(pos(1)));
 	}
-}
+}

+ 5 - 5
tests/display/src/cases/Issue7171.hx

@@ -2,13 +2,13 @@ package cases;
 
 class Issue7171 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			Std.string.bi{-1-}nd(_);
+		class Main {
+			static function main() {
+				Std.string.bi{-1-}nd(_);
+			}
 		}
-	}
 	**/
 	function test() {
 		eq("(s : Dynamic) -> String", type(pos(1)));
 	}
-}
+}

+ 14 - 14
tests/display/src/cases/Issue7172.hx

@@ -2,34 +2,34 @@ package cases;
 
 class Issue7172 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {}
+		class Main {
+			static function main() {}
 
-		function foo() {
-			this.{-1-}
+			function foo() {
+				this.{-1-}
 
 
-			var x:Int;
+				var x:Int;
+			}
 		}
-	}
 	**/
 	function testNo() {
 		eq(false, hasField(fields(pos(1)), "x", "Int"));
 	}
 
 	/**
-	class Main {
-		static function main() {}
+		class Main {
+			static function main() {}
 
-		function foo() {
-			this.{-1-}
+			function foo() {
+				this.{-1-}
 
-		}
+			}
 
-			var x:Int;
-	}
+				var x:Int;
+		}
 	**/
 	function testYes() {
 		eq(true, hasField(fields(pos(1)), "x", "Int"));
 	}
-}
+}

+ 3 - 3
tests/display/src/cases/Issue7211.hx

@@ -2,11 +2,11 @@ package cases;
 
 class Issue7211 extends DisplayTestCase {
 	/**
-	var s:{f:String} = null;
-	switch s.{-1-}
+		var s:{f:String} = null;
+		switch s.{-1-}
 	**/
 	@:funcCode
 	function test() {
 		eq(true, hasField(fields(pos(1)), "f", "String"));
 	}
-}
+}

+ 22 - 22
tests/display/src/cases/Issue7219.hx

@@ -2,59 +2,59 @@ package cases;
 
 class Issue7219 extends DisplayTestCase {
 	/**
-	class Main {
-		static function main() {
-			if ([].{-1-}
+		class Main {
+			static function main() {
+				if ([].{-1-}
+			}
 		}
-	}
 	**/
 	function testIf() {
 		eq(true, fields(pos(1)).length > 0);
 	}
 
 	/**
-	class Main {
-		static function main() {
-			for ([].{-1-}
+		class Main {
+			static function main() {
+				for ([].{-1-}
+			}
 		}
-	}
 	**/
 	function testFor() {
 		eq(true, fields(pos(1)).length > 0);
 	}
 
 	/**
-	class Main {
-		static function main() {
-			while ([].{-1-}
+		class Main {
+			static function main() {
+				while ([].{-1-}
+			}
 		}
-	}
 	**/
 	function testWhile() {
 		eq(true, fields(pos(1)).length > 0);
 	}
 
 	/**
-	class Main {
-		static function main() {
-			do [].{-1-}
+		class Main {
+			static function main() {
+				do [].{-1-}
+			}
 		}
-	}
 	**/
 	function testDoWhile1() {
 		eq(true, fields(pos(1)).length > 0);
 	}
 
 	/**
-	class Main {
-		static function main() {
-			do {
+		class Main {
+			static function main() {
+				do {
 
-			} while ([].{-1-}
+				} while ([].{-1-}
+			}
 		}
-	}
 	**/
 	function testDoWhile2() {
 		eq(true, fields(pos(1)).length > 0);
 	}
-}
+}

+ 10 - 10
tests/display/src/cases/Issue7224.hx

@@ -2,18 +2,18 @@ package cases;
 
 class Issue7224 extends DisplayTestCase {
 	/**
-	typedef Nope = Int;
+		typedef Nope = Int;
 
-	class Bar {
-		public function new() {}
-	}
-	typedef Foo = Bar;
+		class Bar {
+			public function new() {}
+		}
+		typedef Foo = Bar;
 
-	class Main {
-		static function main() {
-			new {-1-}
+		class Main {
+			static function main() {
+				new {-1-}
+			}
 		}
-	}
 	**/
 	function test() {
 		var items = toplevel(pos(1));
@@ -21,4 +21,4 @@ class Issue7224 extends DisplayTestCase {
 		eq(true, hasToplevel(items, "type", "Bar"));
 		eq(true, hasToplevel(items, "type", "Foo"));
 	}
-}
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است