Home | History | Annotate | Download | only in harmony

Lines Matching defs:string

30 assertEquals(1, String.prototype.endsWith.length);
48 assertThrows("String.prototype.endsWith.call(null, 'test')", TypeError);
49 assertThrows("String.prototype.endsWith.call(null, null)", TypeError);
50 assertThrows("String.prototype.endsWith.call(undefined, undefined)", TypeError);
52 assertThrows("String.prototype.endsWith.apply(null, ['test'])", TypeError);
53 assertThrows("String.prototype.endsWith.apply(null, [null])", TypeError);
54 assertThrows("String.prototype.endsWith.apply(undefined, [undefined])", TypeError);
57 msg: "Empty string", val: ""
83 var s = String(v);
85 assertTrue(String.prototype.endsWith.call(v, v), e.msg);
86 assertTrue(String.prototype.endsWith.apply(v, [v]), e.msg);
92 this.endsWith = String.prototype.endsWith;
94 return String(value);
137 // https://github.com/mathiasbynens/String.prototype.endsWith/blob/master/tests/tests.js
140 assertEquals(String.prototype.endsWith.length, 1);
141 assertEquals(String.prototype.propertyIsEnumerable("endsWith"), false);
315 var string = "I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9";
316 assertEquals(string.endsWith(""), true);
317 assertEquals(string.endsWith("\xF1t\xEBr"), false);
318 assertEquals(string.endsWith("\xF1t\xEBr", 5), true);
319 assertEquals(string.endsWith("\xE0liz\xE6"), false);
320 assertEquals(string.endsWith("\xE0liz\xE6", 16), true);
321 assertEquals(string.endsWith("\xF8n\u2603\uD83D\uDCA9"), true);
322 assertEquals(string.endsWith("\xF8n\u2603\uD83D\uDCA9", 23), true);
323 assertEquals(string.endsWith("\u2603"), false);
324 assertEquals(string.endsWith("\u2603", 21), true);
325 assertEquals(string.endsWith("\uD83D\uDCA9"), true);
326 assertEquals(string.endsWith("\uD83D\uDCA9", 23), true);
329 String.prototype.endsWith.call(undefined);
332 String.prototype.endsWith.call(undefined, "b");
335 String.prototype.endsWith.call(undefined, "b", 4);
338 String.prototype.endsWith.call(null);
341 String.prototype.endsWith.call(null, "b");
344 String.prototype.endsWith.call(null, "b", 4);
346 assertEquals(String.prototype.endsWith.call(42, "2"), true);
347 assertEquals(String.prototype.endsWith.call(42, "4"), false);
348 assertEquals(String.prototype.endsWith.call(42, "b", 4), false);
349 assertEquals(String.prototype.endsWith.call(42, "2", 1), false);
350 assertEquals(String.prototype.endsWith.call(42, "2", 4), true);
351 assertEquals(String.prototype.endsWith.call({
354 assertEquals(String.prototype.endsWith.call({
357 assertEquals(String.prototype.endsWith.call({
361 String.prototype.endsWith.call({
366 String.prototype.endsWith.call({
372 String.prototype.endsWith.apply(undefined);
375 String.prototype.endsWith.apply(undefined, ["b"]); },
378 String.prototype.endsWith.apply(undefined, ["b", 4]);
381 String.prototype.endsWith.apply(null);
384 String.prototype.endsWith.apply(null, ["b"]);
387 String.prototype.endsWith.apply(null, ["b", 4]);
389 assertEquals(String.prototype.endsWith.apply(42, ["2"]), true);
390 assertEquals(String.prototype.endsWith.apply(42, ["4"]), false);
391 assertEquals(String.prototype.endsWith.apply(42, ["b", 4]), false);
392 assertEquals(String.prototype.endsWith.apply(42, ["2", 1]), false);
393 assertEquals(String.prototype.endsWith.apply(42, ["2", 4]), true);
394 assertEquals(String.prototype.endsWith.apply({
397 assertEquals(String.prototype.endsWith.apply({
400 assertEquals(String.prototype.endsWith.apply({
404 String.prototype.endsWith.apply({
409 String.prototype.endsWith.apply({