Spelling tests

Closes https://github.com/dart-lang/sdk/pull/50920

GitOrigin-RevId: fa87531bd0f52b69485c9d02ff9e44a4a29c6a91
Change-Id: I0ae8574a5b77087895e004079f221201bb550cf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278535
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This commit is contained in:
Josh Soref 2023-01-19 16:24:29 +00:00 committed by Commit Queue
parent ca974e5c4f
commit 84e3c8b50f
63 changed files with 86 additions and 88 deletions

View file

@ -1614,7 +1614,7 @@ void f() {
// but 'b'` to have its own.
//
// Additionally, because the caret is before the identifier, we will have
// seperate default insert/replace ranges.
// separate default insert/replace ranges.
final content = '''
void f(String a, {String? b}) {
f([[^b]]);

View file

@ -246,5 +246,5 @@ annotation on the variable called "`_`":
```
`dart2js:load-priority` annotations are _scoped_: when there are multiple
annotations, the one on the nearest element enclosing the call to `loadLibary()`
is in effect.
annotations, the one on the nearest element enclosing the call to
`loadLibrary()` is in effect.

View file

@ -431,7 +431,7 @@ abstract class TracerVisitor implements TypeInformationVisitor {
bailout('Used as key in Map');
}
// "a[...] = x" could be a list (container) or map assignemnt.
// "a[...] = x" could be a list (container) or map assignment.
if (isIndexSetValue(info)) {
var receiverType = info.receiver.type;
if (inferrer.abstractValueDomain.isContainer(receiverType)) {

View file

@ -420,7 +420,7 @@ abstract class TracerVisitor implements TypeInformationVisitor {
bailout('Used as key in Map');
}
// "a[...] = x" could be a list (container) or map assignemnt.
// "a[...] = x" could be a list (container) or map assignment.
if (isIndexSetValue(info)) {
var receiverType = info.receiver.type;
if (inferrer.abstractValueDomain.isContainer(receiverType)) {

View file

@ -933,8 +933,8 @@ class Namer extends ModularNamer {
name = 'lib_$name';
}
}
// Names constructed based on a libary name will be further disambiguated.
// However, as names from the same libary should have the same library
// Names constructed based on a library name will be further disambiguated.
// However, as names from the same library should have the same library
// name part, we disambiguate the library name here.
String disambiguated = name;
for (int c = 0; libraryLongNames.containsValue(disambiguated); c++) {

View file

@ -1274,7 +1274,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
/// Builds an SSA graph for a sync*/async/async* generator. We generate a
/// entry function which tail-calls a body function. The entry contains
/// per-invocation checks and the body, which is later transformed, contains
/// the re-entrant 'state machine' code.
/// the reentrant 'state machine' code.
void _buildGenerator(FunctionEntity function, ir.FunctionNode functionNode) {
_openFunction(function,
functionNode: functionNode,

View file

@ -73,7 +73,7 @@ abstract class TypeBuilder {
/// Produces code that checks the runtime type is actually the type specified
/// by attempting a type conversion.
HInstruction _checkBoolConverion(HInstruction original) {
HInstruction _checkBoolConversion(HInstruction original) {
var checkInstruction =
HBoolConversion(original, _abstractValueDomain.boolType);
if (checkInstruction.isRedundant(_closedWorld)) {
@ -154,7 +154,7 @@ abstract class TypeBuilder {
if (conditionCheckPolicy.isTrusted) {
checkedOrTrusted = _trustType(original, boolType);
} else if (conditionCheckPolicy.isEmitted) {
checkedOrTrusted = _checkBoolConverion(original);
checkedOrTrusted = _checkBoolConversion(original);
}
if (checkedOrTrusted == original) return original;
builder.add(checkedOrTrusted);

View file

@ -50,7 +50,7 @@ class EventBatch {
return result;
} else {
// Already in a batch, so just use it.
// TODO(rnystrom): Re-entrant calls to wrap() are kind of hairy. They
// TODO(rnystrom): Reentrant calls to wrap() are kind of hairy. They
// can occur in at least one known place:
// 1. You respond to an event handler by calling a function with wrap()
// (i.e. the normal way we wrap event handlers).

View file

@ -37,7 +37,7 @@ def convertOne(infile, options):
def Flags():
""" Consturcts a parser for extracting flags from the command line. """
""" Constructs a parser for extracting flags from the command line. """
result = optparse.OptionParser()
result.add_option("-t",
"--target",

View file

@ -160,7 +160,7 @@ This release contains several **breaking changes**:
- Moved `deferred_library_check` functionality to a library
## 0.2.2
- Added `deferred_libary_check` tool
- Added `deferred_library_check` tool
## 0.2.1
- Merged `verify_deps` tool into `debug_info` tool

View file

@ -309,7 +309,7 @@ class _WasmTransformer extends Transformer {
TreeNode _lowerAsyncStar(FunctionNode functionNode) {
// TODO(joshualitt): This lowering is mostly reasonable, but if possible we
// should try and figure out a way to remove the even / odd dance. That
// said, this will be replaced by an intrinsic implemntation ASAP so it may
// said, this will be replaced by an intrinsic implementation ASAP so it may
// not be worth spending anymore time on this(aside from bug fixes).
//
// Transform

View file

@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE.md file.
# Recompiling with no change shouldn't change the initializer.
# In fact, this woukd (currently) print `[null]` when compiled once,
# In fact, this would (currently) print `[null]` when compiled once,
# but `[a1]` if recompiling main.dart first.
# http://dartbug.com/48895

View file

@ -15,7 +15,7 @@ main() {
expect(true, test1);
// void fn<T extends Null>() is void Function<T extends Never>()
// Should pass with weak checking because because Null becomes equivalent to
// Should pass with weak checking because Null becomes equivalent to
// the bottom type.
expect(true, fnWithNullBound is fnTypeWithNeverBound);
const test2 = fnWithNullBound is fnTypeWithNeverBound;

View file

@ -1588,7 +1588,7 @@ a shared way.
Dynamic dispatch, calling conventions, and runtime type checks, and native SDK
types are different between the two compilers, so those details would require
separete work.
separate work.
### Q: If a JS API returns "Object" does this break dart2js tree shaking?

View file

@ -90,9 +90,9 @@ Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError # Ple
Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError # Please triage this failure
Language/Expressions/Constants/identifier_denotes_a_constant_t06: MissingCompileTimeError # Issue 26580
Language/Expressions/Constants/identifier_denotes_a_constant_t07: MissingCompileTimeError # Issue 26580
Language/Expressions/Function_Invocation/async_generator_invokation_t08: Skip # Issue 25967
Language/Expressions/Function_Invocation/async_generator_invokation_t10: Skip # Issue 25967
Language/Expressions/Function_Invocation/async_invokation_t04: RuntimeError, Pass # co19 issue 57
Language/Expressions/Function_Invocation/async_generator_invocation_t08: Skip # Issue 25967
Language/Expressions/Function_Invocation/async_generator_invocation_t10: Skip # Issue 25967
Language/Expressions/Function_Invocation/async_invocation_t04: RuntimeError, Pass # co19 issue 57
Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError # Please triage this failure
Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError # Please triage this failure
Language/Expressions/Maps/key_value_equals_operator_t02: CompileTimeError # Please triage this failure
@ -1781,7 +1781,7 @@ LibTest/html/Window/requestFileSystem_A01_t01: Skip # Roll 50 failure
LibTest/html/Window/requestFileSystem_A01_t02: Skip # Roll 50 failure
[ $compiler == dart2js && $runtime == chrome && $system == macos ]
Language/Expressions/Function_Invocation/async_invokation_t04: RuntimeError # Please triage this failure
Language/Expressions/Function_Invocation/async_invocation_t04: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/canvas-test_t01: Skip # Times out. Please triage this failure
LayoutTests/fast/canvas/webgl/context-lost-restored_t01: Skip # Times out. Please triage this failure.
LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: Pass, RuntimeError # Please triage this failure

View file

@ -1395,7 +1395,7 @@ body div {
function reportError(msg) {
function handleReady() {
if (this.readyState == this.DONE && this.status != 200) {
var error = 'Sending back error did not succeeed: ' + this.status;
var error = 'Sending back error did not succeed: ' + this.status;
error = error + '. Failed to send msg: ' + msg;
error_div.innerHTML = error;
}

View file

@ -277,7 +277,7 @@ void main() {
expect(
responseQueue,
emitsThrough(rpcErrorResponse(
RPCError('streamSubcribe', 103, 'Stream already subscribed', {
RPCError('streamSubscribe', 103, 'Stream already subscribed', {
'details': "The stream '$streamId' is already subscribed",
}))));
}

View file

@ -349,7 +349,7 @@ D3SymbolTreeMap.prototype._clone = function(datum, filter) {
this.__cloneState.accepted + ' accepted on their own merits), ' +
this.__cloneState.rejected + ' nodes (and their children) ' +
'filtered out,' +
this.__cloneState.pruned + ' nodes pruned because because no ' +
this.__cloneState.pruned + ' nodes pruned because no ' +
'children remained.');
delete this.__cloneState;
}

View file

@ -64,7 +64,7 @@ If `<destination-type>` is a type parameter we will load its value and call its
## JIT mode
In JIT mode we build the TTS lazily on first involcation (the TTS of types will be initialized to the `LazySpecializeTypeTest` stub). If later on more classes get loaded and the TTS fast path starts failing we re-build the TTS.
In JIT mode we build the TTS lazily on first invocation (the TTS of types will be initialized to the `LazySpecializeTypeTest` stub). If later on more classes get loaded and the TTS fast path starts failing we re-build the TTS.
After a hot-reload we reset all types to the lazy specialize TTS.

View file

@ -143,7 +143,7 @@ typedef struct {
* \return Returns a pointer to a Dart_EmbedderInformation structure.
* The embedder keeps the ownership of the structure and any field in it.
* The embedder must ensure that the structure will remain valid until the
* next invokation of the callback.
* next invocation of the callback.
*/
typedef void (*Dart_EmbedderInformationCallback)(
Dart_EmbedderInformation* info);

View file

@ -67,12 +67,12 @@ var tests = <VMTest>[
await initialIsolate.reload();
// Grab the root library.
Service.Library rootLbirary =
Service.Library rootLibrary =
await initialIsolate.rootLibrary.load() as Service.Library;
// Grab self id.
Service.Instance localSelfId = await initialIsolate.invoke(
rootLbirary, 'getSelfId') as Service.Instance;
rootLibrary, 'getSelfId') as Service.Instance;
// Check that the id reported from dart:developer matches the id reported
// from the service protocol.
@ -81,7 +81,7 @@ var tests = <VMTest>[
// Grab the child isolate's id.
Service.Instance localChildId = await initialIsolate.invoke(
rootLbirary, 'getChildId') as Service.Instance;
rootLibrary, 'getChildId') as Service.Instance;
// Check that the id reported from dart:developer matches the id reported
// from the service protocol.

View file

@ -67,11 +67,11 @@ var tests = <VMTest>[
await initialIsolate.reload();
// Grab the root library.
Service.Library rootLbirary = await initialIsolate.rootLibrary.load();
Service.Library rootLibrary = await initialIsolate.rootLibrary.load();
// Grab self id.
Service.Instance localSelfId =
await initialIsolate.invoke(rootLbirary, 'getSelfId');
await initialIsolate.invoke(rootLibrary, 'getSelfId');
// Check that the id reported from dart:developer matches the id reported
// from the service protocol.
@ -80,7 +80,7 @@ var tests = <VMTest>[
// Grab the child isolate's id.
Service.Instance localChildId =
await initialIsolate.invoke(rootLbirary, 'getChildId');
await initialIsolate.invoke(rootLibrary, 'getChildId');
// Check that the id reported from dart:developer matches the id reported
// from the service protocol.

View file

@ -674,7 +674,7 @@ DART_FORCE_INLINE D bit_copy(const S& source) {
return destination;
}
// On Windows the reentrent version of strtok is called
// On Windows the reentrant version of strtok is called
// strtok_s. Unify on the posix name strtok_r.
#if defined(DART_HOST_OS_WINDOWS)
#define snprintf _sprintf_p

View file

@ -349,7 +349,7 @@ D3SymbolTreeMap.prototype._clone = function(datum, filter) {
this.__cloneState.accepted + ' accepted on their own merits), ' +
this.__cloneState.rejected + ' nodes (and their children) ' +
'filtered out,' +
this.__cloneState.pruned + ' nodes pruned because because no ' +
this.__cloneState.pruned + ' nodes pruned because no ' +
'children remained.');
delete this.__cloneState;
}

View file

@ -3548,7 +3548,7 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
// committed into the global object pool at the end of the compilation.
// This makes an assumption that global object pool itself does not
// grow during code generation - unfortunately this is not the case
// becase we might have nested code generation (i.e. we might generate
// because we might have nested code generation (i.e. we might generate
// some stubs). If this indeed happens we retry the compilation.
// (See TryCommitToParent invocation below).
compiler::ObjectPoolBuilder object_pool_builder(

View file

@ -3239,7 +3239,7 @@ Definition* IntConverterInstr::Canonicalize(FlowGraph* flow_graph) {
IntConverterInstr* box_defn = value()->definition()->AsIntConverter();
if ((box_defn != NULL) && (box_defn->representation() == from())) {
// If the first convertion can erase bits (or deoptimize) we can't
// If the first conversion can erase bits (or deoptimize) we can't
// canonicalize it away.
auto src_defn = box_defn->value()->definition();
if ((box_defn->from() == kUnboxedInt64) &&

View file

@ -10350,14 +10350,14 @@ class LoadThreadInstr : public TemplateDefinition<0, NoThrow, Pure> {
M(Arity, _, Name##Z, Inputs, Output) \
M(Arity, _, Name##W, Inputs, Output)
// Define convertion between two SIMD types.
// Define conversion between two SIMD types.
#define SIMD_CONVERSION(M, FromType, ToType) \
M(1, _, FromType##To##ToType, (FromType), ToType)
// List of all recognized SIMD operations.
// Note: except for operations that map to operators (Add, Mul, Sub, Div,
// BitXor, BitOr) all other operations must match names used by
// MethodRecognizer. This allows to autogenerate convertion from
// MethodRecognizer. This allows to autogenerate conversion from
// MethodRecognizer::Kind into SimdOpInstr::Kind (see KindForMethod helper).
// Note: M is for those SimdOp that are recognized methods and BINARY_OP
// is for operators.

View file

@ -4761,7 +4761,7 @@ DEFINE_EMIT(Float32x4Unary, (QRegister result, QRegister left)) {
}
}
DEFINE_EMIT(Simd32x4ToSimd32x4Convertion, (SameAsFirstInput, QRegister left)) {
DEFINE_EMIT(Simd32x4ToSimd32x4Conversion, (SameAsFirstInput, QRegister left)) {
// TODO(dartbug.com/30949) these operations are essentially nop and should
// not generate any code. They should be removed from the graph before
// code generation.
@ -5107,7 +5107,7 @@ DEFINE_EMIT(Int32x4WithFlag,
____(Float32x4Unary) \
CASE(Float32x4ToInt32x4) \
CASE(Int32x4ToFloat32x4) \
____(Simd32x4ToSimd32x4Convertion) \
____(Simd32x4ToSimd32x4Conversion) \
SIMPLE(Float32x4Clamp) \
SIMPLE(Float64x2Clamp) \
CASE(Float32x4WithX) \

View file

@ -458,7 +458,7 @@ static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) {
LocationSummary* IfThenElseInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
comparison()->InitializeLocationSummary(zone, opt);
// TODO(dartbug.com/30952) support convertion of Register to corresponding
// TODO(dartbug.com/30952) support conversion of Register to corresponding
// least significant byte register (e.g. RAX -> AL, RSI -> SIL, r15 -> r15b).
comparison()->locs()->set_out(0, Location::RegisterLocation(RDX));
return comparison()->locs();

View file

@ -10131,7 +10131,7 @@ void main() {
// There exists another test by name DartAPI_Invoke_CrossLibrary.
// However, that currently fails for the dartk configuration as it
// uses Dart_LoadLibray. This test here effectively tests the same
// uses Dart_LoadLibrary. This test here effectively tests the same
// functionality but invokes a function from an imported standard
// library.
TEST_CASE(DartAPI_InvokeImportedFunction) {

View file

@ -98,7 +98,7 @@ struct DwarfCodeKeyValueTrait {
}
Pair() : code(nullptr), value{} {}
// Don't implicitly delete copy and copy assigment constructors.
// Don't implicitly delete copy and copy assignment constructors.
Pair(const Pair& other) = default;
Pair& operator=(const Pair& other) = default;

View file

@ -262,7 +262,7 @@ class IsolateGroupReloadContext {
BitVector* modified_libs_transitive_ = nullptr;
// A bit vector indicating which of the saved libraries that transitively
// depend on a modified libary.
// depend on a modified library.
BitVector* saved_libs_transitive_updated_ = nullptr;
String& root_lib_url_;

View file

@ -470,7 +470,7 @@ void Profiler::DumpStackTrace(uword sp, uword fp, uword pc, bool for_crash) {
// if we hit an assert while printing the stack.
static RelaxedAtomic<uintptr_t> started_dump = 0;
if (started_dump.fetch_add(1u) != 0) {
OS::PrintErr("Aborting re-entrant request for stack trace.\n");
OS::PrintErr("Aborting reentrant request for stack trace.\n");
return;
}
}

View file

@ -476,7 +476,7 @@ TEST_CASE(ResolveUri_DataUri) {
}
// dart:core Uri allows for the base url to be relative (no scheme, no
// authory, relative path) but this behavior is not in RFC 3986. We
// authority, relative path) but this behavior is not in RFC 3986. We
// do not implement this.
TEST_CASE(ResolveUri_RelativeBase_NotImplemented) {
const char* target_uri;

View file

@ -57,8 +57,6 @@ Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer lit
Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Function_Invocation/async_generator_invokation_t08: SkipSlow
Language/Expressions/Function_Invocation/async_generator_invokation_t10: SkipSlow
Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number
Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number

View file

@ -459,7 +459,7 @@ void testReplace() {
}
// Regression test, http://dartbug.com/20814
var uri = Uri.parse("/no-authorty/");
var uri = Uri.parse("/no-authority/");
uri = uri.replace(fragment: "fragment");
Expect.isFalse(uri.hasAuthority);
@ -575,7 +575,7 @@ void testPackageUris() {
void testBackslashes() {
// Tests change which makes `\` be treated as `/` in
// autority and path.
// authority and path.
Expect.stringEquals("https://example.com/",
Uri.parse(r"https:\\example.com\").toString());

View file

@ -461,7 +461,7 @@ void testReplace() {
}
// Regression test, http://dartbug.com/20814
var uri = Uri.parse("/no-authorty/");
var uri = Uri.parse("/no-authority/");
uri = uri.replace(fragment: "fragment");
Expect.isFalse(uri.hasAuthority);
@ -577,7 +577,7 @@ void testPackageUris() {
void testBackslashes() {
// Tests change which makes `\` be treated as `/` in
// autority and path.
// authority and path.
Expect.stringEquals("https://example.com/",
Uri.parse(r"https:\\example.com\").toString());

View file

@ -91,7 +91,7 @@ void main() {
final Function? localNullableLegacy = () => 'hello';
final String Function()? localNullable = () => 'hello';
// Assigment to JS static field.
// Assignment to JS static field.
Expect.throws(() {
_jsStaticVariable = () => 'hello';
});

View file

@ -89,7 +89,7 @@ void main() {
final Function localNonNullLegacy = () => 'hello';
final String Function() localNonNull = () => 'hello';
// Assigment to JS static field.
// Assignment to JS static field.
Expect.throws(() {
_jsStaticVariable = () => 'hello';
});

View file

@ -27,7 +27,7 @@ class ACall {
}
main() {
// Each test declares a spearate async function, tests that `async`
// Each test declares a separate async function, tests that `async`
// can occur in it, and makes sure the function is run.
{
const int async = 0;

View file

@ -4,7 +4,7 @@
import "package:expect/expect.dart";
// Test re-entrant initializer - calls throw StackOverflowError.
// Test reentrant initializer - calls throw StackOverflowError.
var trace;

View file

@ -56,7 +56,7 @@ abstract class C5Bar implements C5 {
// Valid abstract class, super-invocation of foo hits implementation,
// even if bar is still abstract.
abstract class A5Foo = C5Foo with M5;
// Invalid since super-invocaton of foo does not hit concrete implementation.
// Invalid since super-invocation of foo does not hit concrete implementation.
abstract class _ = C5Bar with M5; //# 08: compile-time error
class A5FooConcrete = A5Foo with C5Bar;

View file

@ -9,7 +9,7 @@ import 'never_null_assignability_lib1.dart';
// Tests for direct calls to null safe functions.
void testNullSafeCalls() {
// Test calling a null safe function expecting Null from a null safe libary
// Test calling a null safe function expecting Null from a null safe library
{
takesNull(nil);
Expect.throws<String>(() => takesNull(never));
@ -18,7 +18,7 @@ void testNullSafeCalls() {
Expect.throwsTypeError(() => (takesNull as dynamic)(3));
}
// Test calling a null safe function expecting Never from a null safe libary
// Test calling a null safe function expecting Never from a null safe library
{
Expect.throws<String>(() => takesNever(never));
// 3 can't be cast to Null or Never
@ -26,7 +26,7 @@ void testNullSafeCalls() {
Expect.throwsTypeError(() => (takesNever as dynamic)(3));
}
// Test calling a null safe function expecting int from a null safe libary
// Test calling a null safe function expecting int from a null safe library
{
takesInt(3);
Expect.throwsTypeError(() => takesInt(nil as dynamic));
@ -34,14 +34,14 @@ void testNullSafeCalls() {
Expect.throwsTypeError(() => (takesInt as dynamic)("hello"));
}
// Test calling a null safe function expecting Object from a null safe libary
// Test calling a null safe function expecting Object from a null safe library
{
takesObject(3);
Expect.throwsTypeError(() => takesObject(nil as dynamic));
Expect.throwsTypeError(() => (takesObject as dynamic)(nil));
}
// Test calling a null safe function expecting Object? from a null safe libary
// Test calling a null safe function expecting Object? from a null safe library
{
takesAny(3);
takesAny(nil);

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Tests that language operators and constructrs requiring non-nullable values
// Tests that language operators and constructs requiring non-nullable values
// will not accept an operand with a nullable static type.
// See: https://github.com/dart-lang/language/issues/298

View file

@ -15,7 +15,7 @@ main() {
Expect.isFalse(fnWithNonNullObjectBound is fnTypeWithNullableObjectBound);
// void fn<T extends Null>() is void Function<T extends Never>()
// Should fail with strong checking because because Null and Never are treated
// Should fail with strong checking because Null and Never are treated
// as distinct.
Expect.isFalse(fnWithNullBound is fnTypeWithNeverBound);
}

View file

@ -17,7 +17,7 @@ main() {
Expect.isTrue(test1);
// void fn<T extends Null>() is void Function<T extends Never>()
// Should pass with weak checking because because Null becomes equivalent to
// Should pass with weak checking because Null becomes equivalent to
// the bottom type.
Expect.isTrue(fnWithNullBound is fnTypeWithNeverBound);
const test2 = fnWithNullBound is fnTypeWithNeverBound;

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// noSuchMethod does not overwrite actual implementations, so if an
// implemetation of a member exists that doesn't fulfill the interface it's
// implementation of a member exists that doesn't fulfill the interface it's
// an error.
// On the other hand, if no implementation exists,
// noSuchMethod will take its place and everything is okay.

View file

@ -63,7 +63,7 @@ testPhiRepresentation(f, arr) {
return arr[0];
}
testPhiConvertions(f, arr) {
testPhiConversions(f, arr) {
if (f) {
arr[0] = arr[1];
} else {
@ -559,8 +559,8 @@ main() {
u32List[2] = 0x7FFFFFFF;
for (var i = 0; i < 20; i++) {
testPhiConvertions(true, u32List);
testPhiConvertions(false, u32List);
testPhiConversions(true, u32List);
testPhiConversions(false, u32List);
}
for (var i = 0; i < 20; i++) {

View file

@ -123,7 +123,7 @@ class TypeTest {
return 1;
}
static int testListAssigment() {
static int testListAssignment() {
// Note: Many of these used to be runtime errors when implicit downcasts
// were permitted. Now these are mostly compile time errors.
int result = 0;
@ -181,7 +181,7 @@ class TypeTest {
Expect.equals(1, testFunctionNum());
Expect.equals(9, testBoolCheck());
Expect.equals(1, testFactory());
Expect.equals(8, testListAssigment());
Expect.equals(8, testListAssignment());
}
}

View file

@ -29,7 +29,7 @@ class ACall {
}
main() {
// Each test declares a spearate async function, tests that `async`
// Each test declares a separate async function, tests that `async`
// can occur in it, and makes sure the function is run.
{
const int async = 0;

View file

@ -6,7 +6,7 @@
import "package:expect/expect.dart";
// Test re-entrant initializer - calls throw Error.
// Test reentrant initializer - calls throw Error.
var trace;

View file

@ -58,7 +58,7 @@ abstract class C5Bar implements C5 {
// Valid abstract class, super-invocation of foo hits implementation,
// even if bar is still abstract.
abstract class A5Foo = C5Foo with M5;
// Invalid since super-invocaton of foo does not hit concrete implementation.
// Invalid since super-invocation of foo does not hit concrete implementation.
abstract class _ = C5Bar with M5; //# 08: compile-time error
class A5FooConcrete = A5Foo with C5Bar;

View file

@ -5,7 +5,7 @@
// @dart = 2.9
// noSuchMethod does not overwrite actual implementations, so if an
// implemetation of a member exists that doesn't fulfill the interface it's
// implementation of a member exists that doesn't fulfill the interface it's
// an error.
// On the other hand, if no implementation exists,
// noSuchMethod will take its place and everything is okay.

View file

@ -65,7 +65,7 @@ testPhiRepresentation(f, arr) {
return arr[0];
}
testPhiConvertions(f, arr) {
testPhiConversions(f, arr) {
if (f) {
arr[0] = arr[1];
} else {
@ -561,8 +561,8 @@ main() {
u32List[2] = 0x7FFFFFFF;
for (var i = 0; i < 20; i++) {
testPhiConvertions(true, u32List);
testPhiConvertions(false, u32List);
testPhiConversions(true, u32List);
testPhiConversions(false, u32List);
}
for (var i = 0; i < 20; i++) {

View file

@ -124,7 +124,7 @@ class TypeTest {
return 1;
}
static int testListAssigment() {
static int testListAssignment() {
int result = 0;
{
var a = new List<dynamic>.filled(5, null);
@ -180,7 +180,7 @@ class TypeTest {
Expect.equals(1, testFunctionNum());
Expect.equals(9, testBoolCheck());
Expect.equals(1, testFactory());
Expect.equals(8, testListAssigment());
Expect.equals(8, testListAssignment());
}
}

View file

@ -584,7 +584,7 @@ class LogAnyEvent extends Event {
return true;
}
bool _testSubcribe() {
bool _testSubscribe() {
_actual = "*[Subscribed]";
return true;
}

View file

@ -28,7 +28,7 @@ void test1() {
// We start two isolates, one paused and one not.
// The unpaused one must send an event, after which
// we resume that paused isolate, and expect the second event.
// This is not a guaranteed test, since it can succeede even if the
// This is not a guaranteed test, since it can succeed even if the
// paused isolate isn't really paused.
// However, it must never fail, since that would mean that a paused
// isolate sends a message.

View file

@ -110,7 +110,7 @@ class MathLibraryTest {
}
if (b == 0.0) {
// No need to look if they are close. Otherwise the check for 'a' above
// whould have triggered.
// would have triggered.
Expect.equals(a, b);
}
final double shiftRightBy52 = 2.220446049250313080847263336181640625e-16;

View file

@ -107,7 +107,7 @@ class MathTest {
}
if (b == 0.0) {
// No need to look if they are close. Otherwise the check for 'a' above
// whould have triggered.
// would have triggered.
Expect.equals(a, b);
}
final double shiftRightBy52 = 2.220446049250313080847263336181640625e-16;

View file

@ -583,7 +583,7 @@ class LogAnyEvent extends Event {
return true;
}
bool _testSubcribe() {
bool _testSubscribe() {
_actual = "*[Subscribed]";
return true;
}

View file

@ -30,7 +30,7 @@ void test1() {
// We start two isolates, one paused and one not.
// The unpaused one must send an event, after which
// we resume that paused isolate, and expect the second event.
// This is not a guaranteed test, since it can succeede even if the
// This is not a guaranteed test, since it can succeed even if the
// paused isolate isn't really paused.
// However, it must never fail, since that would mean that a paused
// isolate sends a message.

View file

@ -112,7 +112,7 @@ class MathLibraryTest {
}
if (b == 0.0) {
// No need to look if they are close. Otherwise the check for 'a' above
// whould have triggered.
// would have triggered.
Expect.equals(a, b);
}
final double shiftRightBy52 = 2.220446049250313080847263336181640625e-16;

View file

@ -109,7 +109,7 @@ class MathTest {
}
if (b == 0.0) {
// No need to look if they are close. Otherwise the check for 'a' above
// whould have triggered.
// would have triggered.
Expect.equals(a, b);
}
final double shiftRightBy52 = 2.220446049250313080847263336181640625e-16;