From 628a520bc033b780d1d48986593805005593f547 Mon Sep 17 00:00:00 2001
From: Pascal Sommer
Date: Thu, 28 Nov 2024 23:39:11 +0100
Subject: [PATCH] Update tests with changed docstrings
---
tests/baselines/reference/1.0lib-noErrors.js | 7 ++++---
tests/baselines/reference/1.0lib-noErrors.symbols | 4 ++--
tests/baselines/reference/1.0lib-noErrors.types | 4 ++--
.../baselines/reference/completionsStringMethods.baseline | 4 ++--
tests/cases/conformance/decorators/1.0lib-noErrors.ts | 6 +++---
5 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/tests/baselines/reference/1.0lib-noErrors.js b/tests/baselines/reference/1.0lib-noErrors.js
index b190ac91b1594..fc49f788730ec 100644
--- a/tests/baselines/reference/1.0lib-noErrors.js
+++ b/tests/baselines/reference/1.0lib-noErrors.js
@@ -297,14 +297,14 @@ interface String {
concat(...strings: string[]): string;
/**
- * Returns the position of the first occurrence of a substring.
+ * Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
indexOf(searchString: string, position?: number): number;
/**
- * Returns the last occurrence of a substring in the string.
+ * Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
@@ -1143,7 +1143,8 @@ declare var Array: {
(...items: T[]): T[];
isArray(arg: any): boolean;
prototype: Array;
-}
+}
+
//// [1.0lib-noErrors.js]
/* *****************************************************************************
diff --git a/tests/baselines/reference/1.0lib-noErrors.symbols b/tests/baselines/reference/1.0lib-noErrors.symbols
index 5ac0014e33ed1..2b0cef1ee8f89 100644
--- a/tests/baselines/reference/1.0lib-noErrors.symbols
+++ b/tests/baselines/reference/1.0lib-noErrors.symbols
@@ -440,7 +440,7 @@ interface String {
>strings : Symbol(strings, Decl(1.0lib-noErrors.ts, 293, 11))
/**
- * Returns the position of the first occurrence of a substring.
+ * Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
@@ -450,7 +450,7 @@ interface String {
>position : Symbol(position, Decl(1.0lib-noErrors.ts, 300, 33))
/**
- * Returns the last occurrence of a substring in the string.
+ * Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
diff --git a/tests/baselines/reference/1.0lib-noErrors.types b/tests/baselines/reference/1.0lib-noErrors.types
index f7d94356d476b..d36516c82e1ab 100644
--- a/tests/baselines/reference/1.0lib-noErrors.types
+++ b/tests/baselines/reference/1.0lib-noErrors.types
@@ -491,7 +491,7 @@ interface String {
> : ^^^^^^^^
/**
- * Returns the position of the first occurrence of a substring.
+ * Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
@@ -504,7 +504,7 @@ interface String {
> : ^^^^^^
/**
- * Returns the last occurrence of a substring in the string.
+ * Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline
index bf00835b43760..c1b618086f6f1 100644
--- a/tests/baselines/reference/completionsStringMethods.baseline
+++ b/tests/baselines/reference/completionsStringMethods.baseline
@@ -443,7 +443,7 @@
],
"documentation": [
{
- "text": "Returns the position of the first occurrence of a substring.",
+ "text": "Returns the position of the first occurrence of a substring, or -1 if it is not present.",
"kind": "text"
}
],
@@ -585,7 +585,7 @@
],
"documentation": [
{
- "text": "Returns the last occurrence of a substring in the string.",
+ "text": "Returns the last occurrence of a substring in the string, or -1 if it is not present.",
"kind": "text"
}
],
diff --git a/tests/cases/conformance/decorators/1.0lib-noErrors.ts b/tests/cases/conformance/decorators/1.0lib-noErrors.ts
index e170df0c9bf6a..02de2d9aa0d16 100644
--- a/tests/cases/conformance/decorators/1.0lib-noErrors.ts
+++ b/tests/cases/conformance/decorators/1.0lib-noErrors.ts
@@ -295,14 +295,14 @@ interface String {
concat(...strings: string[]): string;
/**
- * Returns the position of the first occurrence of a substring.
+ * Returns the position of the first occurrence of a substring, or -1 if it is not present.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
indexOf(searchString: string, position?: number): number;
/**
- * Returns the last occurrence of a substring in the string.
+ * Returns the last occurrence of a substring in the string, or -1 if it is not present.
* @param searchString The substring to search for.
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
*/
@@ -1141,4 +1141,4 @@ declare var Array: {
(...items: T[]): T[];
isArray(arg: any): boolean;
prototype: Array;
-}
\ No newline at end of file
+}