Skip to content

Commit 0d7a014

Browse files
authored
#2080. Update assertion texts of overriding tests (#2089)
1 parent 26c4e3e commit 0d7a014

33 files changed

+191
-176
lines changed

Language/Classes/Abstract_Instance_Members/override_default_value_t01.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for p
10-
/// @description Checks that it is a static warning if an abstract method
11-
/// overrides an instance method and has a different default value for its
12-
/// optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an instance method and has a different default value for its optional
14+
/// parameter.
1315
///
1416
/// See https://github.com/dart-lang/sdk/issues/34437#issuecomment-432093691
1517
///
1618
/// @issue 27476
1719
/// @author msyabro
1820
19-
2021
class A {
2122
foo([x = 1]) {}
2223
}

Language/Classes/Abstract_Instance_Members/override_default_value_t02.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that it is no static warning if an abstract method
12-
/// overrides an instance method and does not explicitly specify a default value
13-
/// for its optional parameter while the instance method does.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an instance method and does not explicitly specify a default value for its
14+
/// optional parameter while the instance method does.
1415
///
1516
/// See
1617
/// https://github.com/dart-lang/sdk/issues/34437#issuecomment-432093691
@@ -20,7 +21,6 @@
2021
/// @issue 42195
2122
/// @author msyabro
2223
23-
2424
class A {
2525
foo([x = 1]) {}
2626
}

Language/Classes/Abstract_Instance_Members/override_default_value_t03.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that it is a static warning if an instance method
12-
/// overrides an abstract method and has a different default value for its
13-
/// optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an instance method overrides
13+
/// an abstract method and has a different default value for its optional
14+
/// parameter.
1415
///
1516
/// See https://github.com/dart-lang/sdk/issues/34437#issuecomment-432093691
1617
///
1718
/// @issue 27476
1819
/// @author msyabro
1920
20-
2121
abstract class A {
2222
foo([x = 1]);
2323
}

Language/Classes/Abstract_Instance_Members/override_default_value_t04.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that it is a static warning if an instance method
12-
/// overrides an abstract method and does not explicitly specify a default value
13-
/// for its optional parameter while the abstract method does.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an instance method overrides
13+
/// an abstract method and does not explicitly specify a default value for its
14+
/// optional parameter while the abstract method does.
1415
///
1516
/// See https://github.com/dart-lang/sdk/issues/34437#issuecomment-432093691
1617
///
1718
/// @issue 27476
1819
/// @author msyabro
1920
20-
2121
abstract class A {
2222
foo([x = 1]);
2323
}

Language/Classes/Abstract_Instance_Members/override_default_value_t05.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that it is a static warning if an abstract method
12-
/// overrides an abstract method and has a different default value for its
13-
/// optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an abstract method and has a different default value for its optional
14+
/// parameter.
1415
///
1516
/// See https://github.com/dart-lang/sdk/issues/34437#issuecomment-432093691
1617
///
1718
/// @issue 27476
1819
/// @author msyabro
1920
20-
2121
abstract class A {
2222
foo([x = 1]);
2323
}

Language/Classes/Abstract_Instance_Members/override_default_value_t06.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that it is a static warning if an abstract method
12-
/// overrides an abstract method and does not explicitly specify a default value
13-
/// for its optional parameter while the overridden method does.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an abstract method and does not explicitly specify a default value for its
14+
/// optional parameter while the overridden method does.
1415
/// @author msyabro
1516
/// @issue 42195
1617
17-
1818
abstract class A {
1919
foo([x = 1]);
2020
}

Language/Classes/Abstract_Instance_Members/override_default_value_t07.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that there are no static warnings if an abstract method
12-
/// overrides another abstract method and overridden method does not explicitly
13-
/// specify a default value for its optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// another abstract method and overridden method does not explicitly specify a
14+
/// default value for its optional parameter.
1415
/// @author msyabro
1516
16-
1717
abstract class A {
1818
foo([x]);
1919
}

Language/Classes/Abstract_Instance_Members/override_default_value_t08.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that there are no static warnings if an abstract method
12-
/// overrides an instance method and overridden method does not explicitly
13-
/// specify a default value for its optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an instance method and overridden method does not explicitly specify a
14+
/// default value for its optional parameter.
1415
/// @author msyabro
1516
16-
1717
class C {
1818
foo([x]) {}
1919
}

Language/Classes/Abstract_Instance_Members/override_default_value_t09.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It is a static warning if an instance method m1 overrides an instance member
8-
/// m2, the signature of m2 explicitly specifies a default value for a formal
9-
/// parameter p and the signature of m1 specifies a different default value for
10-
/// p.
11-
/// @description Checks that there are no static warnings if an instance method
12-
/// overrides an abstract method and overridden method does not explicitly
13-
/// specify a default value for its optional parameter.
7+
/// It is not an error or warning if an instance method m1 overrides an instance
8+
/// member m2, the signature of m2 explicitly specifies a default value for a
9+
/// formal parameter p and the signature of m1 specifies a different default
10+
/// value for p
11+
///
12+
/// @description Checks that it is not an error if an instance method overrides
13+
/// an abstract method and overridden method does not explicitly specify a
14+
/// default value for its optional parameter.
1415
/// @author msyabro
1516
16-
1717
abstract class A {
1818
foo([x]);
1919
}

Language/Classes/Abstract_Instance_Members/override_default_value_t10.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
/// @assertion Unless explicitly stated otherwise, all ordinary rules that apply
66
/// to methods apply to abstract methods.
7-
/// It there is no static warning if an instance method m1 overrides an instance
7+
/// It is not an error or warning if an instance method m1 overrides an instance
88
/// member m2, the signature of m2 explicitly specifies a default value for a
99
/// formal parameter p and the signature of m1 specifies a different default
1010
/// value for p
1111
///
12-
/// @description Checks that it is no static warning if an abstract method
13-
/// overrides an instance method and has a different default value for its
14-
/// optional parameter. Test type aliases
12+
/// @description Checks that it is not an error if an abstract method overrides
13+
/// an instance method and has a different default value for its optional
14+
/// parameter. Test type aliases
1515
///
1616
/// See https://github.com/dart-lang/language/commit/6df1612f667f7fdd28dd3b66a89e06b75ea98d2a
1717
///
@@ -21,6 +21,7 @@
2121
class A {
2222
foo([x = 1]) {}
2323
}
24+
2425
typedef AAlias = A;
2526

2627
class C extends AAlias {

0 commit comments

Comments
 (0)