浏览代码

[tests] fix for undefined map order

Simon Krajewski 7 年之前
父节点
当前提交
065899e4d5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tests/unit/src/unit/TestKeyValueIterator.hx

+ 1 - 0
tests/unit/src/unit/TestKeyValueIterator.hx

@@ -19,6 +19,7 @@ private class MyStringMap<T> {
 		for (key in map.keys()) {
 			a.push({key: key, value: map.get(key)});
 		}
+		a.sort((a, b) -> Reflect.compare(a.key, b.key));
 		return a.iterator();
 	}
 }