Skip to content

Commit a6fcb56

Browse files
asashourCommit Bot
authored and
Commit Bot
committed
Fix typos
Fixes #49094 TEST=ci Change-Id: I23cdcb5ad2fc83e5e91d80e34b66af186c0cb923 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245820 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Slava Egorov <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
1 parent 94aa2ad commit a6fcb56

19 files changed

+45
-46
lines changed

pkg/analysis_server/test/src/plugin/notification_manager_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class NotificationManagerTest extends ProtocolTestUtilities {
9090
_verifyNavigationParams(serverParams);
9191
}
9292

93-
void test_handlePluginNotification_occurences() {
93+
void test_handlePluginNotification_occurrences() {
9494
manager.setSubscriptions({
9595
server.AnalysisService.OCCURRENCES: {fileA, fileB}
9696
});

pkg/compiler/lib/src/js/size_estimator.dart

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

pkg/compiler/lib/src/js_backend/frequency_assignment.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void naiveFrequencyAssignment(
4242
///
4343
/// - [hashOf]: Function returning a stable hash code for item `i`.
4444
///
45-
/// - [countOf]: Function returning the frequency or number of occurences of
45+
/// - [countOf]: Function returning the frequency or number of occurrences of
4646
/// item `i`.
4747
///
4848
/// - [assign]: Function to register the assignment of a name to item `i`.

pkg/dds/test/dap/integration/test_client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ extension DapTestClientExtension on DapTestClient {
582582
null,
583583
);
584584

585-
// For convenience, use the ProtocolList to deserialise the custom
585+
// For convenience, use the ProtocolList to deserialize the custom
586586
// response to check if included DDS.
587587
final protocolList =
588588
vm.ProtocolList.parse(response.body as Map<String, Object?>?);

pkg/dds/tool/dap/codegen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ class CodeGenerator {
457457
}
458458
}
459459

460-
/// Writes an expression to deserialise a [valueCode].
460+
/// Writes an expression to deserialize a [valueCode].
461461
///
462462
/// If [type] represents a spec type, it's `fromJson` function will be called.
463463
/// If [type] is a [List], it will be mapped over this function again.

pkg/front_end/test/spell_checking_list_code.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,6 @@ observe
871871
obstruct
872872
occasionally
873873
occupied
874-
occurences
875874
offending
876875
ogham
877876
oked

pkg/kernel/lib/type_algebra.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ abstract class Substitution {
284284
/// *not* correspond to a sequence of two substitutions. For example,
285285
/// combining `{T -> List<G>}` with `{G -> String}` does not correspond to
286286
/// `{T -> List<String>}` because the result from substituting `T` is not
287-
/// searched for occurences of `G`.
287+
/// searched for occurrences of `G`.
288288
static Substitution combine(Substitution first, Substitution second) {
289289
if (first == _NullSubstitution.instance) return second;
290290
if (second == _NullSubstitution.instance) return first;

runtime/vm/json_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ ISOLATE_UNIT_TEST_CASE(JSON_JSONStream_DartObject) {
169169
JSONObject jsobj(&jsarr);
170170
jsobj.AddProperty("object_key", Object::Handle(Object::null()));
171171
}
172-
// WARNING: This MUST be big enough for the serialised JSON string.
172+
// WARNING: This MUST be big enough for the serialized JSON string.
173173
const int kBufferSize = 2048;
174174
char buffer[kBufferSize];
175175
const char* json_str = js.ToCString();

runtime/vm/object_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5838,7 +5838,7 @@ ISOLATE_UNIT_TEST_CASE(PrintJSON) {
58385838
}
58395839

58405840
ISOLATE_UNIT_TEST_CASE(PrintJSONPrimitives) {
5841-
// WARNING: This MUST be big enough for the serialised JSON string.
5841+
// WARNING: This MUST be big enough for the serialized JSON string.
58425842
const int kBufferSize = 4096;
58435843
char buffer[kBufferSize];
58445844
Isolate* isolate = Isolate::Current();

runtime/vm/source_report_test.cc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static ObjectPtr ExecuteScript(const char* script, bool allow_errors = false) {
2727
}
2828

2929
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NoCalls) {
30-
// WARNING: This MUST be big enough for the serialised JSON string.
30+
// WARNING: This MUST be big enough for the serialized JSON string.
3131
const int kBufferSize = 1024;
3232
char buffer[kBufferSize];
3333
const char* kScript =
@@ -59,7 +59,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NoCalls) {
5959
}
6060

6161
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_SimpleCall) {
62-
// WARNING: This MUST be big enough for the serialised JSON string.
62+
// WARNING: This MUST be big enough for the serialized JSON string.
6363
const int kBufferSize = 1024;
6464
char buffer[kBufferSize];
6565
const char* kScript =
@@ -107,7 +107,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_SimpleCall) {
107107
}
108108

109109
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_ForceCompile) {
110-
// WARNING: This MUST be big enough for the serialised JSON string.
110+
// WARNING: This MUST be big enough for the serialized JSON string.
111111
const int kBufferSize = 1024;
112112
char buffer[kBufferSize];
113113
const char* kScript =
@@ -157,7 +157,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_ForceCompile) {
157157
}
158158

159159
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
160-
// WARNING: This MUST be big enough for the serialised JSON string.
160+
// WARNING: This MUST be big enough for the serialized JSON string.
161161
const int kBufferSize = 1024;
162162
char buffer[kBufferSize];
163163
const char* kScript =
@@ -203,7 +203,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
203203
}
204204

205205
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
206-
// WARNING: This MUST be big enough for the serialised JSON string.
206+
// WARNING: This MUST be big enough for the serialized JSON string.
207207
const int kBufferSize = 1024;
208208
char buffer[kBufferSize];
209209
const char* kScript =
@@ -250,7 +250,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
250250
}
251251

252252
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
253-
// WARNING: This MUST be big enough for the serialised JSON string.
253+
// WARNING: This MUST be big enough for the serialized JSON string.
254254
const int kBufferSize = 1024;
255255
char buffer[kBufferSize];
256256
const char* kScript =
@@ -302,7 +302,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
302302
}
303303

304304
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NestedFunctions) {
305-
// WARNING: This MUST be big enough for the serialised JSON string.
305+
// WARNING: This MUST be big enough for the serialized JSON string.
306306
const int kBufferSize = 1024;
307307
char buffer[kBufferSize];
308308
const char* kScript =
@@ -362,7 +362,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NestedFunctions) {
362362
}
363363

364364
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_RestrictedRange) {
365-
// WARNING: This MUST be big enough for the serialised JSON string.
365+
// WARNING: This MUST be big enough for the serialized JSON string.
366366
const int kBufferSize = 1024;
367367
char buffer[kBufferSize];
368368
const char* kScript =
@@ -496,7 +496,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_AllFunctions_ForceCompile) {
496496
}
497497

498498
ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_SimpleCall) {
499-
// WARNING: This MUST be big enough for the serialised JSON string.
499+
// WARNING: This MUST be big enough for the serialized JSON string.
500500
const int kBufferSize = 2048;
501501
char buffer[kBufferSize];
502502
const char* kScript =
@@ -551,7 +551,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_SimpleCall) {
551551
}
552552

553553
ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
554-
// WARNING: This MUST be big enough for the serialised JSON string.
554+
// WARNING: This MUST be big enough for the serialized JSON string.
555555
const int kBufferSize = 4096;
556556
char buffer[kBufferSize];
557557
const char* kScript =
@@ -675,7 +675,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
675675
}
676676

677677
ISOLATE_UNIT_TEST_CASE(SourceReport_MultipleReports) {
678-
// WARNING: This MUST be big enough for the serialised JSON string.
678+
// WARNING: This MUST be big enough for the serialized JSON string.
679679
const int kBufferSize = 2048;
680680
char buffer[kBufferSize];
681681
const char* kScript =
@@ -731,7 +731,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_MultipleReports) {
731731
}
732732

733733
ISOLATE_UNIT_TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
734-
// WARNING: This MUST be big enough for the serialised JSON string.
734+
// WARNING: This MUST be big enough for the serialized JSON string.
735735
const int kBufferSize = 1024;
736736
char buffer[kBufferSize];
737737
const char* kScript =
@@ -779,7 +779,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
779779
}
780780

781781
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue35453_NoSuchMethod) {
782-
// WARNING: This MUST be big enough for the serialised JSON string.
782+
// WARNING: This MUST be big enough for the serialized JSON string.
783783
const int kBufferSize = 1024;
784784
char buffer[kBufferSize];
785785
const char* kScript =
@@ -828,7 +828,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue35453_NoSuchMethod) {
828828
}
829829

830830
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47017_Assert) {
831-
// WARNING: This MUST be big enough for the serialised JSON string.
831+
// WARNING: This MUST be big enough for the serialized JSON string.
832832
const int kBufferSize = 1024;
833833
char buffer[kBufferSize];
834834
const char* kScript =
@@ -873,7 +873,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47017_Assert) {
873873
}
874874

875875
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47021_StaticOnlyClasses) {
876-
// WARNING: This MUST be big enough for the serialised JSON string.
876+
// WARNING: This MUST be big enough for the serialized JSON string.
877877
const int kBufferSize = 2048;
878878
char buffer[kBufferSize];
879879
const char* kScript =
@@ -1025,7 +1025,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue47021_StaticOnlyClasses) {
10251025

10261026
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov341_LateFinalVars) {
10271027
// https://github.com/dart-lang/coverage/issues/341
1028-
// WARNING: This MUST be big enough for the serialised JSON string.
1028+
// WARNING: This MUST be big enough for the serialized JSON string.
10291029
const int kBufferSize = 1024;
10301030
char buffer[kBufferSize];
10311031
const char* kScript =
@@ -1076,7 +1076,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov341_LateFinalVars) {
10761076
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov386_EnhancedEnums) {
10771077
// https://github.com/dart-lang/coverage/issues/386
10781078
// https://github.com/dart-lang/coverage/issues/377
1079-
// WARNING: This MUST be big enough for the serialised JSON string.
1079+
// WARNING: This MUST be big enough for the serialized JSON string.
10801080
const int kBufferSize = 1024;
10811081
char buffer[kBufferSize];
10821082
const char* kScript =
@@ -1121,7 +1121,7 @@ ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov386_EnhancedEnums) {
11211121
}
11221122

11231123
ISOLATE_UNIT_TEST_CASE(SourceReport_Regress95008_RedirectingFactory) {
1124-
// WARNING: This MUST be big enough for the serialised JSON string.
1124+
// WARNING: This MUST be big enough for the serialized JSON string.
11251125
const int kBufferSize = 1024;
11261126
char buffer[kBufferSize];
11271127
const char* kScript = R"(
@@ -1175,7 +1175,7 @@ main() {
11751175
}
11761176

11771177
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_if) {
1178-
// WARNING: This MUST be big enough for the serialised JSON string.
1178+
// WARNING: This MUST be big enough for the serialized JSON string.
11791179
const int kBufferSize = 1024;
11801180
char buffer[kBufferSize];
11811181
const char* kScript = R"(
@@ -1231,7 +1231,7 @@ main() {
12311231
}
12321232

12331233
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_loops) {
1234-
// WARNING: This MUST be big enough for the serialised JSON string.
1234+
// WARNING: This MUST be big enough for the serialized JSON string.
12351235
const int kBufferSize = 1024;
12361236
char buffer[kBufferSize];
12371237
const char* kScript = R"(
@@ -1297,7 +1297,7 @@ main() {
12971297
}
12981298

12991299
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_switch) {
1300-
// WARNING: This MUST be big enough for the serialised JSON string.
1300+
// WARNING: This MUST be big enough for the serialized JSON string.
13011301
const int kBufferSize = 1024;
13021302
char buffer[kBufferSize];
13031303
const char* kScript = R"(
@@ -1351,7 +1351,7 @@ main() {
13511351
}
13521352

13531353
ISOLATE_UNIT_TEST_CASE(SourceReport_BranchCoverage_try) {
1354-
// WARNING: This MUST be big enough for the serialised JSON string.
1354+
// WARNING: This MUST be big enough for the serialized JSON string.
13551355
const int kBufferSize = 1024;
13561356
char buffer[kBufferSize];
13571357
const char* kScript = R"(

sdk/lib/_internal/js_runtime/lib/string_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ String stringReplaceAllGeneral(
190190
return result.toString();
191191
}
192192

193-
/// Replaces all non-overlapping occurences of [pattern] in [receiver] with
193+
/// Replaces all non-overlapping occurrences of [pattern] in [receiver] with
194194
/// [replacement]. This should be replace with
195195
/// (String.prototype.replaceAll)[https://github.com/tc39/proposal-string-replace-all]
196196
/// when available.

tests/corelib/string_replace_all_common.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ testReplaceAll(Pattern Function(Pattern) wrap) {
1919
// Test with the replaced string at the end.
2020
Expect.equals("abcabdaXX", "abcabdae".replaceAll(wrap("e"), "XX"));
2121

22-
// Test when there are no occurence of the string to replace.
22+
// Test when there are no occurrence of the string to replace.
2323
Expect.equals("abcabdae", "abcabdae".replaceAll(wrap("f"), "XX"));
2424

2525
// Test when the string to change is the empty string.
@@ -69,7 +69,7 @@ testReplaceAllMapped(Pattern Function(Pattern) wrap) {
6969
// Test with the replaced string at the end.
7070
Expect.equals("abcabda[e]", "abcabdae".replaceAllMapped(wrap("e"), mark));
7171

72-
// Test when there are no occurence of the string to replace.
72+
// Test when there are no occurrence of the string to replace.
7373
Expect.equals("abcabdae", "abcabdae".replaceAllMapped(wrap("f"), mark));
7474

7575
// Test when the string to change is the empty string.
@@ -109,7 +109,7 @@ testSplitMapJoin(Pattern Function(Pattern) wrap) {
109109
Expect.equals("<abcabda>[e]<>",
110110
"abcabdae".splitMapJoin(wrap("e"), onMatch: mark, onNonMatch: rest));
111111

112-
// Test when there are no occurence of the string to replace.
112+
// Test when there are no occurrence of the string to replace.
113113
Expect.equals("<abcabdae>",
114114
"abcabdae".splitMapJoin(wrap("f"), onMatch: mark, onNonMatch: rest));
115115

tests/corelib/string_replace_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ main() {
1414
// Test with the replaced string at the end.
1515
Expect.equals("toABtoCDtoEto", "fromABtoCDtoEto".replaceFirst("from", "to"));
1616

17-
// Test when there are no occurence of the string to replace.
17+
// Test when there are no occurrence of the string to replace.
1818
Expect.equals("ABC", "ABC".replaceFirst("from", "to"));
1919

2020
// Test when the string to change is the empty string.
@@ -84,7 +84,7 @@ main() {
8484
Expect.equals("toABtoCDtoEto",
8585
"fromABtoCDtoEto".replaceFirstMapped("from", (_) => "to"));
8686

87-
// Test when there are no occurence of the string to replace.
87+
// Test when there are no occurrence of the string to replace.
8888
Expect.equals("ABC", "ABC".replaceFirstMapped("from", (_) => "to"));
8989

9090
// Test when the string to change is the empty string.

tests/corelib/string_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void testReplaceAll() {
321321
Expect.equals(
322322
"toABtoCDtoEto", "fromABfromCDfromEfrom".replaceAll("from", "to"));
323323

324-
// Test when there are no occurence of the string to replace.
324+
// Test when there are no occurrence of the string to replace.
325325
Expect.equals("ABC", "ABC".replaceAll("from", "to"));
326326

327327
// Test when the string to change is the empty string.

tests/corelib_2/string_replace_all_common.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testReplaceAll(Pattern Function(Pattern) wrap) {
2121
// Test with the replaced string at the end.
2222
Expect.equals("abcabdaXX", "abcabdae".replaceAll(wrap("e"), "XX"));
2323

24-
// Test when there are no occurence of the string to replace.
24+
// Test when there are no occurrence of the string to replace.
2525
Expect.equals("abcabdae", "abcabdae".replaceAll(wrap("f"), "XX"));
2626

2727
// Test when the string to change is the empty string.
@@ -71,7 +71,7 @@ testReplaceAllMapped(Pattern Function(Pattern) wrap) {
7171
// Test with the replaced string at the end.
7272
Expect.equals("abcabda[e]", "abcabdae".replaceAllMapped(wrap("e"), mark));
7373

74-
// Test when there are no occurence of the string to replace.
74+
// Test when there are no occurrence of the string to replace.
7575
Expect.equals("abcabdae", "abcabdae".replaceAllMapped(wrap("f"), mark));
7676

7777
// Test when the string to change is the empty string.
@@ -111,7 +111,7 @@ testSplitMapJoin(Pattern Function(Pattern) wrap) {
111111
Expect.equals("<abcabda>[e]<>",
112112
"abcabdae".splitMapJoin(wrap("e"), onMatch: mark, onNonMatch: rest));
113113

114-
// Test when there are no occurence of the string to replace.
114+
// Test when there are no occurrence of the string to replace.
115115
Expect.equals("<abcabdae>",
116116
"abcabdae".splitMapJoin(wrap("f"), onMatch: mark, onNonMatch: rest));
117117

tests/corelib_2/string_replace_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ main() {
1616
// Test with the replaced string at the end.
1717
Expect.equals("toABtoCDtoEto", "fromABtoCDtoEto".replaceFirst("from", "to"));
1818

19-
// Test when there are no occurence of the string to replace.
19+
// Test when there are no occurrence of the string to replace.
2020
Expect.equals("ABC", "ABC".replaceFirst("from", "to"));
2121

2222
// Test when the string to change is the empty string.
@@ -89,7 +89,7 @@ main() {
8989
Expect.equals("toABtoCDtoEto",
9090
"fromABtoCDtoEto".replaceFirstMapped("from", (_) => "to"));
9191

92-
// Test when there are no occurence of the string to replace.
92+
// Test when there are no occurrence of the string to replace.
9393
Expect.equals("ABC", "ABC".replaceFirstMapped("from", (_) => "to"));
9494

9595
// Test when the string to change is the empty string.

tests/corelib_2/string_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void testReplaceAll() {
323323
Expect.equals(
324324
"toABtoCDtoEto", "fromABfromCDfromEfrom".replaceAll("from", "to"));
325325

326-
// Test when there are no occurence of the string to replace.
326+
// Test when there are no occurrence of the string to replace.
327327
Expect.equals("ABC", "ABC".replaceAll("from", "to"));
328328

329329
// Test when the string to change is the empty string.

0 commit comments

Comments
 (0)