blob: de20d1c487efda77a8b5a864c8dc4b743fe83d75 [file] [log] [blame]
/*
* Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion final bool isEmpty
* Returns true if there is no {key, value} pair in the map.
* @description Check that true is returned only if the map is empty.
* @author msyabro
* @reviewer varlax
*/
library isEmpty_A01_t01;
import "../../../Utils/expect.dart";
test(Map create([Map content])) {
Map<String, Object> map = create();
Expect.isTrue(map.isEmpty);
map["1"] = 1;
Expect.isFalse(map.isEmpty);
map.remove("1");
Expect.isTrue(map.isEmpty);
}