blob: 2890df52e9aa7dc7ce45b1d24c23f3281c0982ca [file] [log] [blame]
description("This page tests sorting of string values");
function shouldBeInThisOrder(a)
{
shouldBeTrue('"' + a[0] + '"' + " < " + '"' + a[1] + '"');
shouldBe('[' + '"' + a[0] + '"' + ',' + '"' + a[1] + '"' + '].sort().toString()', '"' + a + '"');
}
shouldBeInThisOrder(["12", "123"]);
shouldBeInThisOrder(["123", "13"]);
shouldBeInThisOrder(["", " "]);
shouldBeInThisOrder(["close", "closed"]);
shouldBeInThisOrder(["a", "~"]);
shouldBeInThisOrder(["_", "a"]);
shouldBeInThisOrder(["0", "A"]);
shouldBeInThisOrder(["-", "0"]);
shouldBeInThisOrder([" ", "-"]);
shouldBeInThisOrder(["A", "ABC"]);