blob: 7f7054d5a9da3dfbe60d92e4d0b796d2bd6998e2 [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 abstract int lastIndexOf(Pattern pattern, [int start])
/// Returns -1 if other could not be found.
/// @description Checks that -1 is returned when appropriate
/// @author msyabro
import "../../../Utils/expect.dart";
main() {
Expect.isTrue("sss".lastIndexOf("a", 1) == -1);
Expect.isTrue("string".lastIndexOf("g", 1) == -1);
Expect.isTrue("string".lastIndexOf("S", 1) == -1);
Expect.isTrue("".lastIndexOf("s", 0) == -1);
Expect.isTrue("s".lastIndexOf("ss", 1) == -1);
}