【发布时间】:2014-09-29 04:25:26
【问题描述】:
全部,
这是一个检查集合大小的单元测试
main() {
test("Resource Manager Image Load", () {
ResourceManager rm = new ResourceManager();
int WRONG_SIZE = 1000000;
rm.loadImageManifest("data/rm/test_images.yaml").then((_){
print("Length="+ rm.images.length.toString()); // PRINTS '6' - WHICH IS CORRECT
expect(rm.images, hasLength(WRONG_SIZE));
});
});
}
我从浏览器运行它(客户端 Dart 库正在使用中)并且它总是通过,无论 WRONG_SIZE 的值是多少。
帮助表示赞赏。
【问题讨论】:
标签: dart dart-async dart-unittest