Skip to content

Commit

Permalink
#1586. Remove CyclicInitializationError from co19_2 tests (#1591)
Browse files Browse the repository at this point in the history
Authored by @sgrekhov.
  • Loading branch information
sgrekhov authored Dec 14, 2022
1 parent 5c70d75 commit fa1aa99
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ class C {


main() {
Expect.throws(() => C.sVar, (e) => e is CyclicInitializationError);
Expect.throws(() => C.sVar);
Expect.equals(null, C.sVar);

Expect.throws(() => C.sTyped, (e) => e is CyclicInitializationError);
Expect.throws(() => C.sTyped);
Expect.equals(null, C.sTyped);

Expect.throws(() => C.sFinal, (e) => e is CyclicInitializationError);
Expect.throws(() => C.sFinal);
Expect.equals(null, C.sFinal);

Expect.throws(() => C.sFinalTyped, (e) => e is CyclicInitializationError);
Expect.throws(() => C.sFinalTyped);
Expect.equals(null, C.sFinalTyped);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
/// can occur. Otherwise
/// - Variable declaration without initializer. The result of executing the
/// getter method is the value stored in v.
/// @description Checks that CyclicInitializationError is thrown when getter
/// is referenced during evaluation of initialization expression.
/// @description Checks that an error is thrown when getter is referenced during
/// evaluation of initialization expression.
/// @author kaigorodov
import "../../../Utils/expect.dart";
Expand All @@ -38,13 +38,8 @@ class C {
static int sTyped = f();
}


main() {
try {
Expect.throws(() {
C.sTyped;
Expect.fail('CyclicInitializationError is expected');
} on CyclicInitializationError catch (e) {
} catch (e) {
Expect.fail('"$e" of type ${e.runtimeType} thrown instead of CyclicInitializationError');
}
});
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions LibTest/core/CyclicInitializationError/variableName_A01_t01.dart

This file was deleted.

0 comments on commit fa1aa99

Please sign in to comment.