Fix typos

Fixes #49094

TEST=ci

Change-Id: I23cdcb5ad2fc83e5e91d80e34b66af186c0cb923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245820
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
Ahmed Ashour 2022-05-24 09:10:51 +00:00 committed by Commit Bot
parent 94aa2ad5d6
commit a6fcb56901
19 changed files with 45 additions and 46 deletions

View file

@ -90,7 +90,7 @@ class NotificationManagerTest extends ProtocolTestUtilities {
_verifyNavigationParams(serverParams);
}
void test_handlePluginNotification_occurences() {
void test_handlePluginNotification_occurrences() {
manager.setSubscriptions({
server.AnalysisService.OCCURRENCES: {fileA, fileB}
});

View file

@ -59,7 +59,7 @@ class SizeEstimator implements NodeVisitor {
// '<typeHolder>$.<type>' where <typeHolder> is a one byte local and
// <type> is roughly 3 bytes. However, we also have to initialize the type
// in the holder, some like ab:f("QQ<b7c>"), ie 16 bytes. For two
// occurences we will have on average 13 bytes. For a more detailed
// occurrences we will have on average 13 bytes. For a more detailed
// estimate, we'd have to partially finalize the results.
return '###_###_###_#';
} else if (node is StringReference) {

View file

@ -42,7 +42,7 @@ void naiveFrequencyAssignment(
///
/// - [hashOf]: Function returning a stable hash code for item `i`.
///
/// - [countOf]: Function returning the frequency or number of occurences of
/// - [countOf]: Function returning the frequency or number of occurrences of
/// item `i`.
///
/// - [assign]: Function to register the assignment of a name to item `i`.

View file

@ -582,7 +582,7 @@ extension DapTestClientExtension on DapTestClient {
null,
);
// For convenience, use the ProtocolList to deserialise the custom
// For convenience, use the ProtocolList to deserialize the custom
// response to check if included DDS.
final protocolList =
vm.ProtocolList.parse(response.body as Map<String, Object?>?);

View file

@ -457,7 +457,7 @@ class CodeGenerator {
}
}
/// Writes an expression to deserialise a [valueCode].
/// Writes an expression to deserialize a [valueCode].
///
/// If [type] represents a spec type, it's `fromJson` function will be called.
/// If [type] is a [List], it will be mapped over this function again.

View file

@ -871,7 +871,6 @@ observe
obstruct
occasionally
occupied
occurences
offending
ogham
oked

View file

@ -284,7 +284,7 @@ abstract class Substitution {
/// *not* correspond to a sequence of two substitutions. For example,
/// combining `{T -> List<G>}` with `{G -> String}` does not correspond to
/// `{T -> List<String>}` because the result from substituting `T` is not
/// searched for occurences of `G`.
/// searched for occurrences of `G`.
static Substitution combine(Substitution first, Substitution second) {
if (first == _NullSubstitution.instance) return second;
if (second == _NullSubstitution.instance) return first;

View file

@ -169,7 +169,7 @@ ISOLATE_UNIT_TEST_CASE(JSON_JSONStream_DartObject) {
JSONObject jsobj(&jsarr);
jsobj.AddProperty("object_key", Object::Handle(Object::null()));
}
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 2048;
char buffer[kBufferSize];
const char* json_str = js.ToCString();

View file

@ -5838,7 +5838,7 @@ ISOLATE_UNIT_TEST_CASE(PrintJSON) {
}
ISOLATE_UNIT_TEST_CASE(PrintJSONPrimitives) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 4096;
char buffer[kBufferSize];
Isolate* isolate = Isolate::Current();

View file

@ -27,7 +27,7 @@ static ObjectPtr ExecuteScript(const char* script, bool allow_errors = false) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NoCalls) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -59,7 +59,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NoCalls) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_SimpleCall) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -107,7 +107,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_SimpleCall) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_ForceCompile) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -157,7 +157,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_ForceCompile) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -203,7 +203,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -250,7 +250,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -302,7 +302,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NestedFunctions) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -362,7 +362,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NestedFunctions) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_RestrictedRange) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -496,7 +496,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_AllFunctions_ForceCompile) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_SimpleCall) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 2048;
char buffer[kBufferSize];
const char* kScript =
@ -551,7 +551,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_SimpleCall) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 4096;
char buffer[kBufferSize];
const char* kScript =
@ -675,7 +675,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_MultipleReports) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 2048;
char buffer[kBufferSize];
const char* kScript =
@ -731,7 +731,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_MultipleReports) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -779,7 +779,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue35453_NoSuchMethod) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -828,7 +828,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue35453_NoSuchMethod) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47017_Assert) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -873,7 +873,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47017_Assert) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47021_StaticOnlyClasses) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 2048;
char buffer[kBufferSize];
const char* kScript =
@ -1025,7 +1025,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47021_StaticOnlyClasses) {
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov341_LateFinalVars) {
// https://github.com/dart-lang/coverage/issues/341
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -1076,7 +1076,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov341_LateFinalVars) {
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov386_EnhancedEnums) {
// https://github.com/dart-lang/coverage/issues/386
// https://github.com/dart-lang/coverage/issues/377
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript =
@ -1121,7 +1121,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov386_EnhancedEnums) {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_Regress95008_RedirectingFactory) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript = R"(
@ -1175,7 +1175,7 @@ main() {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_if) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript = R"(
@ -1231,7 +1231,7 @@ main() {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_loops) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript = R"(
@ -1297,7 +1297,7 @@ main() {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_switch) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript = R"(
@ -1351,7 +1351,7 @@ main() {
}
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_try) {
// WARNING: This MUST be big enough for the serialised JSON string.
// WARNING: This MUST be big enough for the serialized JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
const char* kScript = R"(

View file

@ -190,7 +190,7 @@ String stringReplaceAllGeneral(
return result.toString();
}
/// Replaces all non-overlapping occurences of [pattern] in [receiver] with
/// Replaces all non-overlapping occurrences of [pattern] in [receiver] with
/// [replacement]. This should be replace with
/// (String.prototype.replaceAll)[https://github.com/tc39/proposal-string-replace-all]
/// when available.

View file

@ -19,7 +19,7 @@ testReplaceAll(Pattern Function(Pattern) wrap) {
// Test with the replaced string at the end.
Expect.equals("abcabdaXX", "abcabdae".replaceAll(wrap("e"), "XX"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("abcabdae", "abcabdae".replaceAll(wrap("f"), "XX"));
// Test when the string to change is the empty string.
@ -69,7 +69,7 @@ testReplaceAllMapped(Pattern Function(Pattern) wrap) {
// Test with the replaced string at the end.
Expect.equals("abcabda[e]", "abcabdae".replaceAllMapped(wrap("e"), mark));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("abcabdae", "abcabdae".replaceAllMapped(wrap("f"), mark));
// Test when the string to change is the empty string.
@ -109,7 +109,7 @@ testSplitMapJoin(Pattern Function(Pattern) wrap) {
Expect.equals("<abcabda>[e]<>",
"abcabdae".splitMapJoin(wrap("e"), onMatch: mark, onNonMatch: rest));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("<abcabdae>",
"abcabdae".splitMapJoin(wrap("f"), onMatch: mark, onNonMatch: rest));

View file

@ -14,7 +14,7 @@ main() {
// Test with the replaced string at the end.
Expect.equals("toABtoCDtoEto", "fromABtoCDtoEto".replaceFirst("from", "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceFirst("from", "to"));
// Test when the string to change is the empty string.
@ -84,7 +84,7 @@ main() {
Expect.equals("toABtoCDtoEto",
"fromABtoCDtoEto".replaceFirstMapped("from", (_) => "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceFirstMapped("from", (_) => "to"));
// Test when the string to change is the empty string.

View file

@ -321,7 +321,7 @@ void testReplaceAll() {
Expect.equals(
"toABtoCDtoEto", "fromABfromCDfromEfrom".replaceAll("from", "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceAll("from", "to"));
// Test when the string to change is the empty string.

View file

@ -21,7 +21,7 @@ testReplaceAll(Pattern Function(Pattern) wrap) {
// Test with the replaced string at the end.
Expect.equals("abcabdaXX", "abcabdae".replaceAll(wrap("e"), "XX"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("abcabdae", "abcabdae".replaceAll(wrap("f"), "XX"));
// Test when the string to change is the empty string.
@ -71,7 +71,7 @@ testReplaceAllMapped(Pattern Function(Pattern) wrap) {
// Test with the replaced string at the end.
Expect.equals("abcabda[e]", "abcabdae".replaceAllMapped(wrap("e"), mark));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("abcabdae", "abcabdae".replaceAllMapped(wrap("f"), mark));
// Test when the string to change is the empty string.
@ -111,7 +111,7 @@ testSplitMapJoin(Pattern Function(Pattern) wrap) {
Expect.equals("<abcabda>[e]<>",
"abcabdae".splitMapJoin(wrap("e"), onMatch: mark, onNonMatch: rest));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("<abcabdae>",
"abcabdae".splitMapJoin(wrap("f"), onMatch: mark, onNonMatch: rest));

View file

@ -16,7 +16,7 @@ main() {
// Test with the replaced string at the end.
Expect.equals("toABtoCDtoEto", "fromABtoCDtoEto".replaceFirst("from", "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceFirst("from", "to"));
// Test when the string to change is the empty string.
@ -89,7 +89,7 @@ main() {
Expect.equals("toABtoCDtoEto",
"fromABtoCDtoEto".replaceFirstMapped("from", (_) => "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceFirstMapped("from", (_) => "to"));
// Test when the string to change is the empty string.

View file

@ -323,7 +323,7 @@ void testReplaceAll() {
Expect.equals(
"toABtoCDtoEto", "fromABfromCDfromEfrom".replaceAll("from", "to"));
// Test when there are no occurence of the string to replace.
// Test when there are no occurrence of the string to replace.
Expect.equals("ABC", "ABC".replaceAll("from", "to"));
// Test when the string to change is the empty string.

View file

@ -22,7 +22,7 @@ void setup() {
class B {
// We need to define a foo method so that dart2js sees it. Because the
// only occurences of 'foo' is on B, a Dart class, no interceptor is used. It
// only occurrences of 'foo' is on B, a Dart class, no interceptor is used. It
// thinks all calls will either go to this method, or throw a
// NoSuchMethodError. It is possible that the native class will shadow a
// method, but it will not shadow 'foo' because the name is either 'mangled'

View file

@ -24,7 +24,7 @@ void setup() {
class B {
// We need to define a foo method so that dart2js sees it. Because the
// only occurences of 'foo' is on B, a Dart class, no interceptor is used. It
// only occurrences of 'foo' is on B, a Dart class, no interceptor is used. It
// thinks all calls will either go to this method, or throw a
// NoSuchMethodError. It is possible that the native class will shadow a
// method, but it will not shadow 'foo' because the name is either 'mangled'