mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:56:57 +00:00
Revert "Reland "Reland "[infra] Add failing test to test CI systems and approvals workflow"""
This reverts commit4b5d757bea
. Reason for revert: This intentionally failing test should have been reverted immediately, after verifying that it was detected by the CI. Original change's description: > Reland "Reland "[infra] Add failing test to test CI systems and approvals workflow"" > > This reverts commit84a4bbcabc
. > > Reason for revert: Another try to land, to get more logging data. > > Original change's description: > > Revert "Reland "[infra] Add failing test to test CI systems and approvals workflow"" > > > > This reverts commitc716068538
. > > > > Reason for revert: Trying again to diagnose failure to copy approvals. > > > > Original change's description: > > > Reland "[infra] Add failing test to test CI systems and approvals workflow" > > > > > > This reverts commit25def20f5d
. > > > > > > Reason for revert: Retrying, now that we are copying CQ approvals for all commits in the blamelist of a builder. > > > > > > Original change's description: > > > > Revert "[infra] Add failing test to test CI systems and approvals workflow" > > > > > > > > This reverts commite578eeb235
. > > > > > > > > Reason for revert: The reverted commit is a test of the new approvals UI for tryjobs and the CI. It includes an intentionally failing test, that we now remove again. > > > > > > > > Original change's description: > > > > > [infra] Add failing test to test CI systems and approvals workflow > > > > > > > > > > The failing test lib_2/collection/failing_list_test.dart is added, > > > > > which imports dart:io. So it will be a compile-time failure on > > > > > some dart2js platforms, and a run-time failure on dart:io. > > > > > > > > > > This commit is just to test the UI and backend for test failure > > > > > approvals on tryjobs and on CI results. It will be reverted after > > > > > the CI builders have run on it. > > > > > > > > > > Change-Id: Icc3d11e72511cb0dbd9a62cb4fa80e754c203c8c > > > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127883 > > > > > Reviewed-by: Jonas Termansen <sortie@google.com> > > > > > > > > TBR=whesse@google.com,sortie@google.com > > > > > > > > Change-Id: I32b900e25dc562ac88f5cb496cdbca726fc70445 > > > > No-Presubmit: true > > > > No-Tree-Checks: true > > > > No-Try: true > > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127885 > > > > Reviewed-by: William Hesse <whesse@google.com> > > > > > > TBR=whesse@google.com,sortie@google.com > > > > > > Change-Id: I64e528131c779c8d20c007ff715b57b599cd3f07 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127886 > > > Reviewed-by: William Hesse <whesse@google.com> > > > Reviewed-by: Jonas Termansen <sortie@google.com> > > > > TBR=whesse@google.com,sortie@google.com,athom@google.com > > > > Change-Id: Icf68fd813d5f8f98d5ebf40c34e35811e8fffaf5 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127892 > > Reviewed-by: William Hesse <whesse@google.com> > > TBR=whesse@google.com,sortie@google.com,athom@google.com > > Change-Id: Ic63f74bf660e71e5e1853a391013368ce640bbc1 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127895 > Reviewed-by: William Hesse <whesse@google.com> > Reviewed-by: Jonas Termansen <sortie@google.com> TBR=whesse@google.com,sortie@google.com,athom@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib82dadb2c82f2329164b29e60997320b775c104d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130378 Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
parent
0081dfc706
commit
c9a9db63e3
|
@ -1,157 +0,0 @@
|
||||||
// Copyright (c) 2013, 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.
|
|
||||||
|
|
||||||
import 'dart:collection';
|
|
||||||
import 'dart:io';
|
|
||||||
import "package:expect/expect.dart";
|
|
||||||
|
|
||||||
class MyList<E> extends ListBase<E> {
|
|
||||||
List<E> _list;
|
|
||||||
|
|
||||||
MyList(List<E> this._list);
|
|
||||||
|
|
||||||
int get length => _list.length;
|
|
||||||
|
|
||||||
void set length(int x) {
|
|
||||||
_list.length = x;
|
|
||||||
}
|
|
||||||
|
|
||||||
E operator [](int idx) => _list[idx];
|
|
||||||
|
|
||||||
void operator []=(int idx, E value) {
|
|
||||||
_list[idx] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class MyNoSuchMethodList<E> extends Object
|
|
||||||
with ListMixin<E>
|
|
||||||
implements List<E> {
|
|
||||||
List<E> _list;
|
|
||||||
|
|
||||||
MyNoSuchMethodList(List<E> this._list);
|
|
||||||
|
|
||||||
noSuchMethod(Invocation invocation) {
|
|
||||||
if (invocation.memberName == #length && invocation.isGetter) {
|
|
||||||
return _list.length;
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("length=") &&
|
|
||||||
invocation.isSetter) {
|
|
||||||
_list.length = invocation.positionalArguments.first;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("[]") &&
|
|
||||||
invocation.positionalArguments.length == 1) {
|
|
||||||
return _list[invocation.positionalArguments.first];
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("[]=") &&
|
|
||||||
invocation.positionalArguments.length == 2) {
|
|
||||||
_list[invocation.positionalArguments.first] =
|
|
||||||
invocation.positionalArguments[1];
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return super.noSuchMethod(invocation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Class that behaves like a list but does not implement List.
|
|
||||||
class MyIndexableNoSuchMethod<E> {
|
|
||||||
List<E> _list;
|
|
||||||
|
|
||||||
MyIndexableNoSuchMethod(List<E> this._list);
|
|
||||||
|
|
||||||
noSuchMethod(Invocation invocation) {
|
|
||||||
if (invocation.memberName == #length && invocation.isGetter) {
|
|
||||||
return _list.length;
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("length=") &&
|
|
||||||
invocation.isSetter) {
|
|
||||||
_list.length = invocation.positionalArguments.first;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("prototype")) {
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (invocation.memberName == const Symbol("[]") &&
|
|
||||||
invocation.positionalArguments.length == 1) {
|
|
||||||
return _list[invocation.positionalArguments.first];
|
|
||||||
}
|
|
||||||
if (invocation.memberName == const Symbol("[]=") &&
|
|
||||||
invocation.positionalArguments.length == 2) {
|
|
||||||
_list[invocation.positionalArguments.first] =
|
|
||||||
invocation.positionalArguments[1];
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return super.noSuchMethod(invocation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void testRetainWhere() {
|
|
||||||
List<int> list = <int>[1, 2, 3];
|
|
||||||
list.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(true, false);
|
|
||||||
Expect.equals(1, list.length);
|
|
||||||
Expect.equals(2, list.first);
|
|
||||||
Expect.equals(2, list[0]);
|
|
||||||
|
|
||||||
list = new MyList<int>([1, 2, 3]);
|
|
||||||
list.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, list.length);
|
|
||||||
Expect.equals(2, list.first);
|
|
||||||
Expect.equals(2, list[0]);
|
|
||||||
|
|
||||||
list = new MyNoSuchMethodList<int>([1, 2, 3]);
|
|
||||||
list.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, list.length);
|
|
||||||
Expect.equals(2, list.first);
|
|
||||||
Expect.equals(2, list[0]);
|
|
||||||
|
|
||||||
// Equivalent tests where the type of the List is known statically.
|
|
||||||
{
|
|
||||||
var l = new MyList<int>([1, 2, 3]);
|
|
||||||
l.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, l.length);
|
|
||||||
Expect.equals(2, l.first);
|
|
||||||
Expect.equals(2, l[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var l = new MyNoSuchMethodList<int>([1, 2, 3]);
|
|
||||||
l.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, l.length);
|
|
||||||
Expect.equals(2, l.first);
|
|
||||||
Expect.equals(2, l[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equivalent tests where the type of the List is not known.
|
|
||||||
{
|
|
||||||
dynamic l = new MyList<int>([1, 2, 3]);
|
|
||||||
l.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, l.length);
|
|
||||||
Expect.equals(2, l.first);
|
|
||||||
Expect.equals(2, l[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
dynamic l = new MyNoSuchMethodList<int>([1, 2, 3]);
|
|
||||||
l.retainWhere((x) => x % 2 == 0);
|
|
||||||
Expect.equals(1, l.length);
|
|
||||||
Expect.equals(2, l.first);
|
|
||||||
Expect.equals(2, l[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
dynamic indexable = new MyIndexableNoSuchMethod<int>([1, 2, 3]);
|
|
||||||
Expect.equals(3, indexable.length);
|
|
||||||
Expect.equals(1, indexable[0]);
|
|
||||||
Expect.equals(3, indexable[2]);
|
|
||||||
indexable.length = 2;
|
|
||||||
Expect.equals(2, indexable.length);
|
|
||||||
Expect.equals(42, indexable.prototype);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
testRetainWhere();
|
|
||||||
}
|
|
|
@ -30,9 +30,6 @@ html/xhr_test/xhr: Skip # Times out. Issue 21527
|
||||||
[ $csp ]
|
[ $csp ]
|
||||||
isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
|
isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
|
||||||
|
|
||||||
[ $compiler != dart2analyzer && !$csp ]
|
|
||||||
collection/failing_list_test: Skip # This test is only testing the approval UI. It will be reverted quickly.
|
|
||||||
|
|
||||||
[ $runtime == chrome && $system == linux ]
|
[ $runtime == chrome && $system == linux ]
|
||||||
mirrors/native_class_test: Slow
|
mirrors/native_class_test: Slow
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue