Spelling tests
Closes https://github.com/dart-lang/sdk/pull/50764 GitOrigin-RevId: ee2fe9a75d50e877f4ad2fe3743acdbc04f186ef Change-Id: Ia73cd22da4e6ec95e84772aa4e1345ce2dbde215 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276360 Reviewed-by: Erik Ernst <eernst@google.com> Commit-Queue: Erik Ernst <eernst@google.com>
This commit is contained in:
@@ -6,7 +6,7 @@ library map_test;
|
||||
|
||||
import 'dart:collection';
|
||||
|
||||
// Test that length/isEmpty opertions are constant time on
|
||||
// Test that length/isEmpty operations are constant time on
|
||||
// maps, strings and collections.
|
||||
|
||||
void testString(int n) {
|
||||
|
||||
@@ -18,7 +18,7 @@ cyclicInitialization() {
|
||||
// Helper method to detect whether [errorType] is an overflow error.
|
||||
//
|
||||
// TODO(41308): Use `is StackOverflowError` once DDC converts overflow errors
|
||||
// from JavaSript.
|
||||
// from JavaScript.
|
||||
bool isOverflowError(Type errorType) {
|
||||
void detectOverflowError() => detectOverflowError();
|
||||
try {
|
||||
|
||||
@@ -32,7 +32,7 @@ void main() {
|
||||
// Two different time zones found. Now find the precise (to the minute)
|
||||
// time where a change happened, and test that.
|
||||
test(findChange(time2, time));
|
||||
// Remeber if the change moved the clock forward or backward.
|
||||
// Remember if the change moved the clock forward or backward.
|
||||
changeForward = offset2 < offset;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ main() {
|
||||
|
||||
/// Lazily emits all permutations of [values].
|
||||
///
|
||||
/// Modifes [values] rather than create a new list.
|
||||
/// Modifies [values] rather than create a new list.
|
||||
/// The [values] list is guaranteed to end up in its original state
|
||||
/// after all permutations have been read.
|
||||
Iterable<List<T>> permutations<T>(List<T> values) {
|
||||
|
||||
@@ -29,7 +29,7 @@ void testSpecialCases() {
|
||||
Expect.equals("\xb5", "\xb5".toLowerCase());
|
||||
Expect.equals("\u03Bc", // //# 02: continued
|
||||
"\xb5".toUpperCase().toLowerCase()); // //# 02: continued
|
||||
// Small letter y diaresis.
|
||||
// Small letter y diaeresis.
|
||||
Expect.equals("\u0178", "\xff".toUpperCase()); // //# 03: ok
|
||||
Expect.equals("\xff", "\xff".toLowerCase());
|
||||
Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // //# 03: continued
|
||||
|
||||
@@ -36,7 +36,7 @@ void testIntegerShifts() {
|
||||
testShift(0x7ffffffffffff000, i);
|
||||
testShift(0xfffffffffffff000, i);
|
||||
// Construct the values below to get 'all ones' values on the VM without a
|
||||
// compile-time error for roundned literals on the web. The arithmetic
|
||||
// compile-time error for rounded literals on the web. The arithmetic
|
||||
// produces rounded values on the web, so they are effectively testing zero.
|
||||
testShift(0x7ffffffffffff000 + 0xfff, i);
|
||||
testShift(0xfffffffffffff000 + 0xfff, i);
|
||||
|
||||
@@ -8,7 +8,7 @@ library map_test;
|
||||
|
||||
import 'dart:collection';
|
||||
|
||||
// Test that length/isEmpty opertions are constant time on
|
||||
// Test that length/isEmpty operations are constant time on
|
||||
// maps, strings and collections.
|
||||
|
||||
void testString(int n) {
|
||||
|
||||
@@ -34,7 +34,7 @@ void main() {
|
||||
// Two different time zones found. Now find the precise (to the minute)
|
||||
// time where a change happened, and test that.
|
||||
test(findChange(time2, time));
|
||||
// Remeber if the change moved the clock forward or backward.
|
||||
// Remember if the change moved the clock forward or backward.
|
||||
changeForward = offset2 < offset;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ main() {
|
||||
|
||||
/// Lazily emits all permutations of [values].
|
||||
///
|
||||
/// Modifes [values] rather than create a new list.
|
||||
/// Modifies [values] rather than create a new list.
|
||||
/// The [values] list is guaranteed to end up in its original state
|
||||
/// after all permutations have been read.
|
||||
Iterable<List<T>> permutations<T>(List<T> values) {
|
||||
|
||||
@@ -31,7 +31,7 @@ void testSpecialCases() {
|
||||
Expect.equals("\xb5", "\xb5".toLowerCase());
|
||||
Expect.equals("\u03Bc", // //# 02: continued
|
||||
"\xb5".toUpperCase().toLowerCase()); // //# 02: continued
|
||||
// Small letter y diaresis.
|
||||
// Small letter y diaeresis.
|
||||
Expect.equals("\u0178", "\xff".toUpperCase()); // //# 03: ok
|
||||
Expect.equals("\xff", "\xff".toLowerCase());
|
||||
Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // //# 03: continued
|
||||
|
||||
@@ -75,7 +75,7 @@ final primitiveCType = {
|
||||
PrimitiveType.float: "float",
|
||||
PrimitiveType.double_: "double",
|
||||
// People should use explicit sizes. But we also want to test `long`.
|
||||
// Surpressing lint.
|
||||
// Suppressing lint.
|
||||
PrimitiveType.long: "/* NOLINT(runtime/int) */long",
|
||||
PrimitiveType.ulong: "/* NOLINT(runtime/int) */unsigned long",
|
||||
PrimitiveType.uintptr: "uintptr_t",
|
||||
|
||||
@@ -319,11 +319,11 @@ On arm, arguments are 4 byte aligned."""),
|
||||
FunctionType(
|
||||
[
|
||||
uint8,
|
||||
struct32bytesInlineArrayMultiDimesional,
|
||||
struct32bytesInlineArrayMultiDimensional,
|
||||
uint8,
|
||||
struct8bytesInlineArrayMultiDimesional,
|
||||
struct8bytesInlineArrayMultiDimensional,
|
||||
uint8,
|
||||
struct8bytesInlineArrayMultiDimesional,
|
||||
struct8bytesInlineArrayMultiDimensional,
|
||||
uint8
|
||||
],
|
||||
uint32,
|
||||
@@ -667,9 +667,9 @@ final compounds = [
|
||||
struct16bytesFloatInlineNested,
|
||||
struct32bytesDoubleInlineNested,
|
||||
struct16bytesMixedInlineNested,
|
||||
struct8bytesInlineArrayMultiDimesional,
|
||||
struct32bytesInlineArrayMultiDimesional,
|
||||
struct64bytesInlineArrayMultiDimesional,
|
||||
struct8bytesInlineArrayMultiDimensional,
|
||||
struct32bytesInlineArrayMultiDimensional,
|
||||
struct64bytesInlineArrayMultiDimensional,
|
||||
structMultiDimensionalStruct,
|
||||
struct3bytesPacked,
|
||||
struct3bytesPackedMembersAligned,
|
||||
@@ -817,15 +817,15 @@ final struct16bytesMixedInlineNested = StructType.override([
|
||||
FixedLengthArrayType(int16, 2),
|
||||
], "Struct16BytesMixed3");
|
||||
|
||||
final struct8bytesInlineArrayMultiDimesional = StructType([
|
||||
final struct8bytesInlineArrayMultiDimensional = StructType([
|
||||
FixedLengthArrayType.multi(uint8, [2, 2, 2])
|
||||
]);
|
||||
|
||||
final struct32bytesInlineArrayMultiDimesional = StructType([
|
||||
final struct32bytesInlineArrayMultiDimensional = StructType([
|
||||
FixedLengthArrayType.multi(uint8, [2, 2, 2, 2, 2])
|
||||
]);
|
||||
|
||||
final struct64bytesInlineArrayMultiDimesional = StructType([
|
||||
final struct64bytesInlineArrayMultiDimensional = StructType([
|
||||
FixedLengthArrayType.multi(uint8, [2, 2, 2, 2, 2, 2])
|
||||
]);
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ $compiler == dart2js && $checked,symbol_reserved_word_test/03,RuntimeError,"Issu
|
||||
$compiler == dart2js && $minified,error_stack_trace1_test,RuntimeError,Issue 12399,https://dartbug.com/12399,closed
|
||||
$compiler == dart2js && $minified,iterable_return_type_test/02,RuntimeError,Dart2js does not support Uint64*.,,
|
||||
$compiler == dart2js && $minified,list_concurrent_modify_test,RuntimeError,dart2js does not fully implement these,,
|
||||
$compiler == dart2js && $minified,nsm_invocation_test,RuntimeError,Symbols don't match due to minifiaction.,,
|
||||
$compiler == dart2js && $minified,nsm_invocation_test,RuntimeError,Symbols don't match due to minification.,,
|
||||
$compiler == dart2js && $minified,symbol_reserved_word_test/03,RuntimeError,"Issue 19972, new Symbol('void') should be allowed.",https://dartbug.com/19972,closed
|
||||
$runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk),bit_twiddling_test/int64,"RuntimeError, OK",Requires fixed-size int64 support.,,
|
||||
$runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk),compare_to2_test,"RuntimeError, OK",Requires fixed-size int64 support.,,
|
||||
|
||||
|
@@ -18,7 +18,7 @@ void testIgnore() {
|
||||
});
|
||||
|
||||
asyncStart();
|
||||
// Ignored futures can still be listend to.
|
||||
// Ignored futures can still be listened to.
|
||||
{
|
||||
var c = Completer<int>.sync();
|
||||
var f = c.future;
|
||||
|
||||
@@ -224,7 +224,7 @@ testNumbers() {
|
||||
testError(signs: "+");
|
||||
// Requires digits after decimal point.
|
||||
testError(fractions: ".");
|
||||
// Requires exponent digts, and only digits.
|
||||
// Requires exponent digits, and only digits.
|
||||
testError(exponents: ["e", "e+", "e-", "e.0"]);
|
||||
|
||||
// No whitespace inside numbers.
|
||||
|
||||
@@ -34,6 +34,6 @@ main() {
|
||||
// The Extension stream in not protected so calling this should not fail
|
||||
postEvent('theEvent', {'the': 'data'}, stream: 'Extension');
|
||||
|
||||
// Should be allowed to post to a non-protecvted custom stream
|
||||
// Should be allowed to post to a non-protected custom stream
|
||||
postEvent('theEvent', {'the': 'data'}, stream: 'someCustomStream');
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:expect/minitest.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
main() {
|
||||
var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElemt');
|
||||
var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElement');
|
||||
var isDivElement = predicate((x) => x is DivElement, 'is a DivElement');
|
||||
var isText = predicate((x) => x is Text, 'is a Text');
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class JSWindow {}
|
||||
|
||||
// `futureValueType` corresponds to the `JSWindow` type parameter in the return
|
||||
// value here. If this isn't correctly erased, we should see a runtime type
|
||||
// error when using this method, as we'll be attemting to return a `@Native`
|
||||
// error when using this method, as we'll be attempting to return a `@Native`
|
||||
// type (`Window`) where a `package:js` type is expected instead of a
|
||||
// `JavaScriptObject`.
|
||||
Future<JSWindow> returnInteropType() async {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
library test.delgate_function_invocation;
|
||||
library test.delegate_function_invocation;
|
||||
|
||||
import 'dart:mirrors';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ library test.instantiate_abstract_class;
|
||||
import 'dart:mirrors';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
assertInstanitationErrorOnGenerativeConstructors(classMirror) {
|
||||
assertInstantiationErrorOnGenerativeConstructors(classMirror) {
|
||||
classMirror.declarations.values.forEach((decl) {
|
||||
if (decl is! MethodMirror) return;
|
||||
if (!decl.isGenerativeConstructor) return;
|
||||
@@ -37,10 +37,10 @@ abstract class AbstractClass {
|
||||
class ConcreteClass implements AbstractClass {}
|
||||
|
||||
main() {
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(num));
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(double));
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(StackTrace));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(num));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(double));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(StackTrace));
|
||||
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(AbstractClass));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(AbstractClass));
|
||||
runFactoryConstructors(reflectType(AbstractClass));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,6 @@ class ClassInOtherFile {
|
||||
|
||||
topLevelInOtherFile() {}
|
||||
|
||||
spaceIdentedInOtherFile() {}
|
||||
spaceIndentedInOtherFile() {}
|
||||
|
||||
tabIdentedInOtherFile() {}
|
||||
tabIndentedInOtherFile() {}
|
||||
|
||||
@@ -34,8 +34,8 @@ class ClassInMainFile {
|
||||
}
|
||||
|
||||
void topLevelInMainFile() {}
|
||||
spaceIdentedInMainFile() {}
|
||||
tabIdentedInMainFile() {}
|
||||
spaceIndentedInMainFile() {}
|
||||
tabIndentedInMainFile() {}
|
||||
|
||||
class HasImplicitConstructor {}
|
||||
|
||||
@@ -55,8 +55,8 @@ main() {
|
||||
expectLocation(
|
||||
reflectClass(ClassInMainFile).declarations[#method]!, mainSuffix, 33, 3);
|
||||
expectLocation(reflect(topLevelInMainFile), mainSuffix, 36, 1);
|
||||
expectLocation(reflect(spaceIdentedInMainFile), mainSuffix, 37, 3);
|
||||
expectLocation(reflect(tabIdentedInMainFile), mainSuffix, 38, 2);
|
||||
expectLocation(reflect(spaceIndentedInMainFile), mainSuffix, 37, 3);
|
||||
expectLocation(reflect(tabIndentedInMainFile), mainSuffix, 38, 2);
|
||||
expectLocation(reflect(localFunction), mainSuffix, 45, 3);
|
||||
|
||||
// Another part.
|
||||
@@ -65,8 +65,8 @@ main() {
|
||||
expectLocation(
|
||||
reflectClass(ClassInOtherFile).declarations[#method]!, otherSuffix, 10, 3);
|
||||
expectLocation(reflect(topLevelInOtherFile), otherSuffix, 13, 1);
|
||||
expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 15, 3);
|
||||
expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 17, 2);
|
||||
expectLocation(reflect(spaceIndentedInOtherFile), otherSuffix, 15, 3);
|
||||
expectLocation(reflect(tabIndentedInOtherFile), otherSuffix, 17, 2);
|
||||
|
||||
// Synthetic methods.
|
||||
Expect.isNull(reflectClass(HasImplicitConstructor)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICESNE file.
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
library mirrors.reader;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ testInvoke(mirrors) {
|
||||
}
|
||||
|
||||
/// In dart2js, lists, numbers, and other objects are treated special
|
||||
/// and their methods are invoked through a techique called interceptors.
|
||||
/// and their methods are invoked through a technique called interceptors.
|
||||
testIntercepted(mirrors) {
|
||||
{
|
||||
var instance = 1;
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:expect/expect.dart';
|
||||
|
||||
// This test is much longer that is strictly necessary to test
|
||||
// InstanceMirror.type in the face of a reflectee overriding runtimeType, but
|
||||
// shows a case where one might have legimate reason to override runtimeType.
|
||||
// shows a case where one might have legitimate reason to override runtimeType.
|
||||
// See section 2.2 in Mark Miller's Robust Composition: Towards a Unified
|
||||
// Approach to Access Control and Concurrency Control.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ void testIgnore() {
|
||||
});
|
||||
|
||||
asyncStart();
|
||||
// Ignored futures can still be listend to.
|
||||
// Ignored futures can still be listened to.
|
||||
{
|
||||
var c = Completer<int>.sync();
|
||||
var f = c.future;
|
||||
|
||||
@@ -226,7 +226,7 @@ testNumbers() {
|
||||
testError(signs: "+");
|
||||
// Requires digits after decimal point.
|
||||
testError(fractions: ".");
|
||||
// Requires exponent digts, and only digits.
|
||||
// Requires exponent digits, and only digits.
|
||||
testError(exponents: ["e", "e+", "e-", "e.0"]);
|
||||
|
||||
// No whitespace inside numbers.
|
||||
|
||||
@@ -34,6 +34,6 @@ main() {
|
||||
// The Extension stream in not protected so calling this should not fail
|
||||
postEvent('theEvent', {'the': 'data'}, stream: 'Extension');
|
||||
|
||||
// Should be allowed to post to a non-protecvted custom stream
|
||||
// Should be allowed to post to a non-protected custom stream
|
||||
postEvent('theEvent', {'the': 'data'}, stream: 'someCustomStream');
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'package:expect/minitest.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
main() {
|
||||
var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElemt');
|
||||
var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElement');
|
||||
var isDivElement = predicate((x) => x is DivElement, 'is a DivElement');
|
||||
var isText = predicate((x) => x is Text, 'is a Text');
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class JSWindow {}
|
||||
|
||||
// `futureValueType` corresponds to the `JSWindow` type parameter in the return
|
||||
// value here. If this isn't correctly erased, we should see a runtime type
|
||||
// error when using this method, as we'll be attemting to return a `@Native`
|
||||
// error when using this method, as we'll be attempting to return a `@Native`
|
||||
// type (`Window`) where a `package:js` type is expected instead of a
|
||||
// `JavaScriptObject`.
|
||||
Future<JSWindow> returnInteropType() async {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library test.delgate_function_invocation;
|
||||
library test.delegate_function_invocation;
|
||||
|
||||
import 'dart:mirrors';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ library test.instantiate_abstract_class;
|
||||
import 'dart:mirrors';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
assertInstanitationErrorOnGenerativeConstructors(classMirror) {
|
||||
assertInstantiationErrorOnGenerativeConstructors(classMirror) {
|
||||
classMirror.declarations.values.forEach((decl) {
|
||||
if (decl is! MethodMirror) return;
|
||||
if (!decl.isGenerativeConstructor) return;
|
||||
@@ -39,10 +39,10 @@ abstract class AbstractClass {
|
||||
class ConcreteClass implements AbstractClass {}
|
||||
|
||||
main() {
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(num));
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(double));
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(StackTrace));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(num));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(double));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(StackTrace));
|
||||
|
||||
assertInstanitationErrorOnGenerativeConstructors(reflectType(AbstractClass));
|
||||
assertInstantiationErrorOnGenerativeConstructors(reflectType(AbstractClass));
|
||||
runFactoryConstructors(reflectType(AbstractClass));
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ class ClassInOtherFile {
|
||||
|
||||
topLevelInOtherFile() {}
|
||||
|
||||
spaceIdentedInOtherFile() {}
|
||||
spaceIndentedInOtherFile() {}
|
||||
|
||||
tabIdentedInOtherFile() {}
|
||||
tabIndentedInOtherFile() {}
|
||||
|
||||
@@ -36,8 +36,8 @@ class ClassInMainFile {
|
||||
}
|
||||
|
||||
void topLevelInMainFile() {}
|
||||
spaceIdentedInMainFile() {}
|
||||
tabIdentedInMainFile() {}
|
||||
spaceIndentedInMainFile() {}
|
||||
tabIndentedInMainFile() {}
|
||||
|
||||
class HasImplicitConstructor {}
|
||||
|
||||
@@ -57,8 +57,8 @@ main() {
|
||||
expectLocation(
|
||||
reflectClass(ClassInMainFile).declarations[#method], mainSuffix, 33, 3);
|
||||
expectLocation(reflect(topLevelInMainFile), mainSuffix, 36, 1);
|
||||
expectLocation(reflect(spaceIdentedInMainFile), mainSuffix, 37, 3);
|
||||
expectLocation(reflect(tabIdentedInMainFile), mainSuffix, 38, 2);
|
||||
expectLocation(reflect(spaceIndentedInMainFile), mainSuffix, 37, 3);
|
||||
expectLocation(reflect(tabIndentedInMainFile), mainSuffix, 38, 2);
|
||||
expectLocation(reflect(localFunction), mainSuffix, 45, 3);
|
||||
|
||||
// Another part.
|
||||
@@ -67,8 +67,8 @@ main() {
|
||||
expectLocation(
|
||||
reflectClass(ClassInOtherFile).declarations[#method], otherSuffix, 10, 3);
|
||||
expectLocation(reflect(topLevelInOtherFile), otherSuffix, 13, 1);
|
||||
expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 15, 3);
|
||||
expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 17, 2);
|
||||
expectLocation(reflect(spaceIndentedInOtherFile), otherSuffix, 15, 3);
|
||||
expectLocation(reflect(tabIndentedInOtherFile), otherSuffix, 17, 2);
|
||||
|
||||
// Synthetic methods.
|
||||
Expect.isNull(reflectClass(HasImplicitConstructor)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICESNE file.
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ testInvoke(mirrors) {
|
||||
}
|
||||
|
||||
/// In dart2js, lists, numbers, and other objects are treated special
|
||||
/// and their methods are invoked through a techique called interceptors.
|
||||
/// and their methods are invoked through a technique called interceptors.
|
||||
testIntercepted(mirrors) {
|
||||
{
|
||||
var instance = 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'package:expect/expect.dart';
|
||||
|
||||
// This test is much longer that is strictly necessary to test
|
||||
// InstanceMirror.type in the face of a reflectee overriding runtimeType, but
|
||||
// shows a case where one might have legimate reason to override runtimeType.
|
||||
// shows a case where one might have legitimate reason to override runtimeType.
|
||||
// See section 2.2 in Mark Miller's Robust Composition: Towards a Unified
|
||||
// Approach to Access Control and Concurrency Control.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// Deliberately fragment the heap and test that GC peformance does not
|
||||
// Deliberately fragment the heap and test that GC performance does not
|
||||
// break down. See https://github.com/dart-lang/sdk/issues/29588
|
||||
// Normally runs in about 6-7 seconds on an x64 machine, using about 2.5Gbytes
|
||||
// of memory.
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
// This test ensures that the VM will support string literals that have non
|
||||
// ascii characters. An unhandeld exception will be thrown if the VM fails
|
||||
// ascii characters. An unhandled exception will be thrown if the VM fails
|
||||
// to support non ascii characters.
|
||||
|
||||
main() {
|
||||
|
||||
@@ -201,7 +201,7 @@ Future<HttpServer> setupServer({Uri? targetServer}) {
|
||||
return completer.future;
|
||||
}
|
||||
|
||||
// A second HTTP server used to validate that redirect requests accross domains
|
||||
// A second HTTP server used to validate that redirect requests across domains
|
||||
// do *not* include security-related headers.
|
||||
Future<HttpServer> setupTargetServer() {
|
||||
final completer = new Completer<HttpServer>();
|
||||
|
||||
@@ -12,11 +12,11 @@ class TestConsumer implements StreamConsumer<List<int>> {
|
||||
final List received = [];
|
||||
|
||||
int addStreamCount = 0;
|
||||
int expcetedAddStreamCount;
|
||||
int expectedAddStreamCount;
|
||||
bool expectClose;
|
||||
|
||||
TestConsumer(this.expected,
|
||||
{this.expectClose = true, this.expcetedAddStreamCount = -1}) {
|
||||
{this.expectClose = true, this.expectedAddStreamCount = -1}) {
|
||||
if (expectClose) asyncStart();
|
||||
}
|
||||
|
||||
@@ -38,15 +38,15 @@ class TestConsumer implements StreamConsumer<List<int>> {
|
||||
return new Future.value().then((_) {
|
||||
if (expectClose) asyncEnd();
|
||||
Expect.listEquals(expected, received);
|
||||
if (expcetedAddStreamCount >= 0) {
|
||||
Expect.equals(expcetedAddStreamCount, addStreamCount);
|
||||
if (expectedAddStreamCount >= 0) {
|
||||
Expect.equals(expectedAddStreamCount, addStreamCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void testClose() {
|
||||
var sink = new IOSink(new TestConsumer([], expcetedAddStreamCount: 0));
|
||||
var sink = new IOSink(new TestConsumer([], expectedAddStreamCount: 0));
|
||||
sink.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ testRenameSync() {
|
||||
|
||||
void testLinkErrorSync() {
|
||||
Expect.throws(
|
||||
() => new Link('some-dir-that-doent exist/some link file/bla/fisk')
|
||||
() => new Link('some-dir-that-does-not exist/some link file/bla/fisk')
|
||||
.createSync('bla bla bla/b lalal/blfir/sdfred/es'),
|
||||
(e) => e is PathNotFoundException);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void doTestSync() {
|
||||
FileStat stat = file2.statSync();
|
||||
Expect.equals(time, stat.modified);
|
||||
|
||||
// Directory operaions in the namespace.
|
||||
// Directory operations in the namespace.
|
||||
// absolute.
|
||||
Expect.equals(dir1.path, dir1rel.absolute.path);
|
||||
// create
|
||||
@@ -155,7 +155,7 @@ doTestAsync() async {
|
||||
FileStat stat = await file2.stat();
|
||||
Expect.equals(time, stat.modified);
|
||||
|
||||
// Directory operaions in the namespace.
|
||||
// Directory operations in the namespace.
|
||||
// absolute.
|
||||
Expect.equals(dir1.path, dir1rel.absolute.path);
|
||||
// create
|
||||
|
||||
@@ -7,13 +7,13 @@ import 'dart:convert';
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// This only works reliabily for "ASCII" cross platform as that is the only
|
||||
// This only works reliably for "ASCII" cross platform as that is the only
|
||||
// well known part of the default Windows code page.
|
||||
void testEncodeDecode(String str) {
|
||||
Expect.equals(systemEncoding.decode(systemEncoding.encode(str)), str);
|
||||
}
|
||||
|
||||
// This only works reliabily for "ASCII" cross platform as that is the only
|
||||
// This only works reliably for "ASCII" cross platform as that is the only
|
||||
// common set of bytes between UTF-8 Windows code pages that convert back
|
||||
// and forth.
|
||||
void testDecodeEncode(List<int> bytes) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
// Test that pair locations are remaped in slow path environments.
|
||||
// Test that pair locations are remapped in slow path environments.
|
||||
// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
// Deliberately fragment the heap and test that GC peformance does not
|
||||
// Deliberately fragment the heap and test that GC performance does not
|
||||
// break down. See https://github.com/dart-lang/sdk/issues/29588
|
||||
// Normally runs in about 6-7 seconds on an x64 machine, using about 2.5Gbytes
|
||||
// of memory.
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
// This test ensures that the VM will support string literals that have non
|
||||
// ascii characters. An unhandeld exception will be thrown if the VM fails
|
||||
// ascii characters. An unhandled exception will be thrown if the VM fails
|
||||
// to support non ascii characters.
|
||||
|
||||
main() {
|
||||
|
||||
@@ -203,7 +203,7 @@ Future<HttpServer> setupServer({Uri targetServer}) {
|
||||
return completer.future;
|
||||
}
|
||||
|
||||
// A second HTTP server used to validate that redirect requests accross domains
|
||||
// A second HTTP server used to validate that redirect requests across domains
|
||||
// do *not* include security-related headers.
|
||||
Future<HttpServer> setupTargetServer() {
|
||||
Completer completer = new Completer<HttpServer>();
|
||||
|
||||
@@ -14,11 +14,11 @@ class TestConsumer implements StreamConsumer<List<int>> {
|
||||
final List received = [];
|
||||
|
||||
int addStreamCount = 0;
|
||||
int expcetedAddStreamCount;
|
||||
int expectedAddStreamCount;
|
||||
bool expectClose;
|
||||
|
||||
TestConsumer(this.expected,
|
||||
{this.expectClose: true, this.expcetedAddStreamCount: -1}) {
|
||||
{this.expectClose: true, this.expectedAddStreamCount: -1}) {
|
||||
if (expectClose) asyncStart();
|
||||
}
|
||||
|
||||
@@ -40,15 +40,15 @@ class TestConsumer implements StreamConsumer<List<int>> {
|
||||
return new Future.value().then((_) {
|
||||
if (expectClose) asyncEnd();
|
||||
Expect.listEquals(expected, received);
|
||||
if (expcetedAddStreamCount >= 0) {
|
||||
Expect.equals(expcetedAddStreamCount, addStreamCount);
|
||||
if (expectedAddStreamCount >= 0) {
|
||||
Expect.equals(expectedAddStreamCount, addStreamCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void testClose() {
|
||||
var sink = new IOSink(new TestConsumer([], expcetedAddStreamCount: 0));
|
||||
var sink = new IOSink(new TestConsumer([], expectedAddStreamCount: 0));
|
||||
sink.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ testRenameSync() {
|
||||
|
||||
void testLinkErrorSync() {
|
||||
Expect.throws(
|
||||
() => new Link('some-dir-that-doent exist/some link file/bla/fisk')
|
||||
() => new Link('some-dir-that-does-not exist/some link file/bla/fisk')
|
||||
.createSync('bla bla bla/b lalal/blfir/sdfred/es'),
|
||||
(e) => e is PathNotFoundException);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void doTestSync() {
|
||||
FileStat stat = file2.statSync();
|
||||
Expect.equals(time, stat.modified);
|
||||
|
||||
// Directory operaions in the namespace.
|
||||
// Directory operations in the namespace.
|
||||
// absolute.
|
||||
Expect.equals(dir1.path, dir1rel.absolute.path);
|
||||
// create
|
||||
@@ -157,7 +157,7 @@ doTestAsync() async {
|
||||
FileStat stat = await file2.stat();
|
||||
Expect.equals(time, stat.modified);
|
||||
|
||||
// Directory operaions in the namespace.
|
||||
// Directory operations in the namespace.
|
||||
// absolute.
|
||||
Expect.equals(dir1.path, dir1rel.absolute.path);
|
||||
// create
|
||||
|
||||
@@ -9,13 +9,13 @@ import 'dart:convert';
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// This only works reliabily for "ASCII" cross platform as that is the only
|
||||
// This only works reliably for "ASCII" cross platform as that is the only
|
||||
// well known part of the default Windows code page.
|
||||
void testEncodeDecode(String str) {
|
||||
Expect.equals(systemEncoding.decode(systemEncoding.encode(str)), str);
|
||||
}
|
||||
|
||||
// This only works reliabily for "ASCII" cross platform as that is the only
|
||||
// This only works reliably for "ASCII" cross platform as that is the only
|
||||
// common set of bytes between UTF-8 Windows code pages that convert back
|
||||
// and forth.
|
||||
void testDecodeEncode(List<int> bytes) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
// Test that pair locations are remaped in slow path environments.
|
||||
// Test that pair locations are remapped in slow path environments.
|
||||
// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'deferred_apply_lib.dart' deferred as lib;
|
||||
|
||||
// Test that the `_Required` sentinel in apply-metadata is initialized.
|
||||
//
|
||||
// This test is structured so that `Function.apply` is partioned out of the main
|
||||
// This test is structured so that `Function.apply` is partitioned out of the main
|
||||
// unit into a 'part' file. `Function.apply` contains a reference to the
|
||||
// `_Required` sentinel marker, which causes the marker to also be in that part.
|
||||
// The apply-metadata for the functions [foo1] and [foo2] contains references to
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// Today the task uses constant values to calculate dependencies, and only uses
|
||||
// those values that were previously computed by resolution. A change to compute
|
||||
// the value on-demmand made the deferred task evaluate more expressions,
|
||||
// the value on-demand made the deferred task evaluate more expressions,
|
||||
// including expressions with free variables (which can't be evaluated). See the
|
||||
// dartbug.com/26406 for details on how we plan to make the task more robust.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/// This test was failing in the past because the deferred-loading algorithm was
|
||||
/// adding entities to the K-element-map after we had closed the world and we
|
||||
/// had created the J-element-map. Later, when we convert the K annotation to
|
||||
/// its J conterpart, we couldn't find it in the conversion maps because it was
|
||||
/// its J counterpart, we couldn't find it in the conversion maps because it was
|
||||
/// added too late.
|
||||
///
|
||||
/// If we add support for mirrors in the future, we just need to ensure that
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
// Today the task uses constant values to calculate dependencies, and only uses
|
||||
// those values that were previously computed by resolution. A change to compute
|
||||
// the value on-demmand made the deferred task evaluate more expressions,
|
||||
// the value on-demand made the deferred task evaluate more expressions,
|
||||
// including expressions with free variables (which can't be evaluated). See the
|
||||
// dartbug.com/26406 for details on how we plan to make the task more robust.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/// This test was failing in the past because the deferred-loading algorithm was
|
||||
/// adding entities to the K-element-map after we had closed the world and we
|
||||
/// had created the J-element-map. Later, when we convert the K annotation to
|
||||
/// its J conterpart, we couldn't find it in the conversion maps because it was
|
||||
/// its J counterpart, we couldn't find it in the conversion maps because it was
|
||||
/// added too late.
|
||||
///
|
||||
/// If we add support for mirrors in the future, we just need to ensure that
|
||||
|
||||
Reference in New Issue
Block a user