From 63f28de43982a4bd550220fb092d49c93ff8ff4f Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Tue, 27 Feb 2024 01:54:00 +0000 Subject: [PATCH] Augment. Update language/augmentation_libraries/class_augmentation_test Change-Id: I979e22e7d6dfd9ef42b94e7d0868123359a104b9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354480 Reviewed-by: Jake Macdonald --- .../class_augmentation.dart | 2 +- .../class_augmentation_test.dart | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/language/augmentation_libraries/class_augmentation.dart b/tests/language/augmentation_libraries/class_augmentation.dart index b1dd59e6606..7a6f5212ed8 100644 --- a/tests/language/augmentation_libraries/class_augmentation.dart +++ b/tests/language/augmentation_libraries/class_augmentation.dart @@ -68,7 +68,7 @@ augment class A with M { } -augment base class B { +augment class B { augment String get superX => '${augmented}b'; } diff --git a/tests/language/augmentation_libraries/class_augmentation_test.dart b/tests/language/augmentation_libraries/class_augmentation_test.dart index 30bba3e75f6..ee047fa13d1 100644 --- a/tests/language/augmentation_libraries/class_augmentation_test.dart +++ b/tests/language/augmentation_libraries/class_augmentation_test.dart @@ -30,24 +30,24 @@ main() { Expect.equals(a.getterWithoutBody, 'bc'); } var a = A(); - Expect(a == a, false); - Expect(A().newFunction(), 'ab'); - Expect(A().newGetter, 'ab'); + Expect.equals(a == a, false); + Expect.equals(A().newFunction(), 'ab'); + Expect.equals(A().newGetter, 'ab'); { var a = A()..newSetter = 'a'; - Expect(a._underlyingString, 'a 1'); + Expect.equals(a._underlyingString, 'a 1'); } - Expect(A() is B, true); - Expect(A() is M, true); - Expect(A() is I, true); - Expect(A().superX, 'abcd'); - Expect(A().mixinX, 'abcd'); + Expect.equals(A() is B, true); + Expect.equals(A() is M, true); + Expect.equals(A() is I, true); + Expect.equals(A().superX, 'abcd'); + Expect.equals(A().mixinX, 'abcd'); - Expect(A().augmentationConstructorInitialized, true); - Expect(A().augmentationInitializerInitialized, true); - Expect(A().constructorInitialized, true); - Expect(A().initializerInitialized, true); + Expect.equals(A().augmentationConstructorInitialized, true); + Expect.equals(A().augmentationInitializerInitialized, true); + Expect.equals(A().constructorInitialized, true); + Expect.equals(A().initializerInitialized, true); } class A { @@ -67,7 +67,7 @@ class A { set setterWithoutBody(String value); set setterWithBody(String value) => _underlyingString = value; - operator==(Object other) => identical(true); + operator==(Object other) => identical(other, this); late final bool augmentationConstructorInitialized; late final bool constructorInitialized; @@ -79,7 +79,7 @@ class A { } } -base class B { +class B { String get superX => 'a'; }