Skip to content

Commit d21b7c2

Browse files
committed
tests: haxe backcompat
1 parent aa70755 commit d21b7c2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

test/src/feathers/controls/GroupListViewTest.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class GroupListViewTest extends Test {
116116
}
117117

118118
public function testSelectionPropertiesAfterSetSelectedLocation():Void {
119-
var collection = new ArrayHierarchicalCollection([{text: "A", children: [{text: "One"}, {text: "Two"}, {text: "Three"}]}],
119+
var collection = new ArrayHierarchicalCollection(([{text: "A", children: [{text: "One"}, {text: "Two"}, {text: "Three"}]}] : Array<Dynamic>),
120120
(item:Dynamic) -> item.children);
121121
this._listView.dataProvider = collection;
122122
Assert.isNull(this._listView.selectedLocation);
@@ -151,7 +151,7 @@ class GroupListViewTest extends Test {
151151
}
152152

153153
public function testSelectionPropertiesAfterSetSelectedItem():Void {
154-
var collection = new ArrayHierarchicalCollection([{text: "A", children: [{text: "One"}, {text: "Two"}, {text: "Three"}]}],
154+
var collection = new ArrayHierarchicalCollection(([{text: "A", children: [{text: "One"}, {text: "Two"}, {text: "Three"}]}] : Array<Dynamic>),
155155
(item:Dynamic) -> item.children);
156156
this._listView.dataProvider = collection;
157157
Assert.isNull(this._listView.selectedLocation);

test/src/feathers/controls/TreeViewTest.hx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ import utest.Test;
210210
}
211211

212212
public function testSelectionPropertiesAfterSetSelectedLocation():Void {
213-
var collection = new ArrayHierarchicalCollection([
213+
var collection = new ArrayHierarchicalCollection(([
214214
{text: "One"},
215215
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
216216
{text: "Three"}
217-
], (item:Dynamic) -> item.children);
217+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
218218
this._treeView.dataProvider = collection;
219219
Assert.isNull(this._treeView.selectedLocation);
220220
Assert.isNull(this._treeView.selectedItem);
@@ -250,11 +250,11 @@ import utest.Test;
250250
}
251251

252252
public function testSelectionPropertiesAfterSetSelectedItem():Void {
253-
var collection = new ArrayHierarchicalCollection([
253+
var collection = new ArrayHierarchicalCollection(([
254254
{text: "One"},
255255
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
256256
{text: "Three"}
257-
], (item:Dynamic) -> item.children);
257+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
258258
this._treeView.dataProvider = collection;
259259
Assert.isNull(this._treeView.selectedLocation);
260260
Assert.isNull(this._treeView.selectedItem);
@@ -290,11 +290,11 @@ import utest.Test;
290290
}
291291

292292
public function testSelectionPropertiesAfterSetSelectedLocations():Void {
293-
var collection = new ArrayHierarchicalCollection([
293+
var collection = new ArrayHierarchicalCollection(([
294294
{text: "One"},
295295
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
296296
{text: "Three"}
297-
], (item:Dynamic) -> item.children);
297+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
298298
this._treeView.dataProvider = collection;
299299
this._treeView.allowMultipleSelection = true;
300300
Assert.isNull(this._treeView.selectedLocation);
@@ -349,11 +349,11 @@ import utest.Test;
349349
}
350350

351351
public function testSelectionPropertiesAfterSetSelectedItems():Void {
352-
var collection = new ArrayHierarchicalCollection([
352+
var collection = new ArrayHierarchicalCollection(([
353353
{text: "One"},
354354
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
355355
{text: "Three"}
356-
], (item:Dynamic) -> item.children);
356+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
357357
this._treeView.dataProvider = collection;
358358
this._treeView.allowMultipleSelection = true;
359359
Assert.isNull(this._treeView.selectedLocation);
@@ -408,11 +408,11 @@ import utest.Test;
408408
}
409409

410410
public function testSelectMultipleLocationsWithAllowMultipleSelectionDisabled():Void {
411-
var collection = new ArrayHierarchicalCollection([
411+
var collection = new ArrayHierarchicalCollection(([
412412
{text: "One"},
413413
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
414414
{text: "Three"}
415-
], (item:Dynamic) -> item.children);
415+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
416416
this._treeView.dataProvider = collection;
417417
this._treeView.allowMultipleSelection = false;
418418
Assert.isNull(this._treeView.selectedLocation);
@@ -464,11 +464,11 @@ import utest.Test;
464464
}
465465

466466
public function testSelectMultipleItemsWithAllowMultipleSelectionDisabled():Void {
467-
var collection = new ArrayHierarchicalCollection([
467+
var collection = new ArrayHierarchicalCollection(([
468468
{text: "One"},
469469
{text: "Two", children: [{text: "2-A"}, {text: "2-B"}]},
470470
{text: "Three"}
471-
], (item:Dynamic) -> item.children);
471+
] : Array<Dynamic>), (item:Dynamic) -> item.children);
472472
this._treeView.dataProvider = collection;
473473
this._treeView.allowMultipleSelection = false;
474474
Assert.isNull(this._treeView.selectedLocation);

0 commit comments

Comments
 (0)