blob: 72cf703c4d911c9bb6a089852b1a91b288fce289 [file] [log] [blame]
// Copyright (c) 2016, 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 SplayTreeSet([int compare(E key1, E key2),
/// bool isValidKey(potentialKey)])
/// ...
/// If the compare function is omitted, it defaults to, and
/// the elements must be comparable.
/// @description Checks that if the compare function is omitted, and the elements
/// are not comparable then exception is thrown
/// @author
import "dart:collection";
import "../../../Utils/expect.dart";
class C {}
main() {
SplayTreeSet set = new SplayTreeSet();
Expect.throws(() {set.add(new C());});