blob: 44c52b9abf2d2d81cb87946664bea2707dfa75b3 [file] [log] [blame]
// Copyright (c) 2013, 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 void reset([int rawIndex = 0])
/// Setting [rawIndex] in the middle of a surrogate pair is an error.
/// @description Checks that it is an error if the index is in the
/// middle of a surrogate pair.
/// @author msyabro
import "../../../Utils/expect.dart";
main() {
var it = new RuneIterator('\u{10000}\u{10001}');
Expect.throws(() {
it.reset(1);
});
Expect.throws(() {
it.reset(3);
});
}