Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: pkg/typed_mock/lib/typed_mock.dart

Issue 2743423009: Run dartfmt on remaining unformated pkg packages (Closed)
Patch Set: Run dartfmt on remaining unformated pkg packages Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/testing/lib/testing.dart ('k') | pkg/typed_mock/test/typed_mock_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/typed_mock/lib/typed_mock.dart
diff --git a/pkg/typed_mock/lib/typed_mock.dart b/pkg/typed_mock/lib/typed_mock.dart
index 180ff2773ed823dbe41c93d3848f4eef2177aca5..c91854c43a517d19b6f26ffef25045aaac7f2b3c 100644
--- a/pkg/typed_mock/lib/typed_mock.dart
+++ b/pkg/typed_mock/lib/typed_mock.dart
@@ -1,6 +1,5 @@
library typed_mock;
-
_InvocationMatcher _lastMatcher;
/// Enables stubbing methods.
@@ -39,14 +38,12 @@ Behavior when(_ignored) {
}
}
-
/// Clears all interactions remembered so far.
resetInteractions(TypedMock mock) {
mock._invocations.clear();
mock._verifiedInvocations.clear();
}
-
/// Verifies certain behavior happened a specified number of times.
Verifier verify(_ignored) {
try {
@@ -60,7 +57,6 @@ Verifier verify(_ignored) {
}
}
-
/// Verifies that the given mock doesn't have any unverified interaction.
void verifyNoMoreInteractions(TypedMock mock) {
var notVerified = mock._computeNotVerifiedInvocations();
@@ -73,7 +69,6 @@ void verifyNoMoreInteractions(TypedMock mock) {
throw new VerifyError('Unexpected interactions:\n$invocationsString');
}
-
/// Verifies that no interactions happened on the given mock.
void verifyZeroInteractions(TypedMock mock) {
var invocations = mock._invocations;
@@ -86,7 +81,6 @@ void verifyZeroInteractions(TypedMock mock) {
throw new VerifyError('Unexpected interactions:\n$invocationsString');
}
-
/// [VerifyError] is thrown when one of the [verify] checks fails.
class VerifyError {
final String message;
@@ -94,7 +88,6 @@ class VerifyError {
String toString() => 'VerifyError: $message';
}
-
String _getInvocationsString(Iterable<Invocation> invocations) {
var buffer = new StringBuffer();
invocations.forEach((invocation) {
@@ -109,7 +102,6 @@ String _getInvocationsString(Iterable<Invocation> invocations) {
return buffer.toString();
}
-
class _InvocationMatcher {
final Symbol _member;
final TypedMock _mock;
@@ -145,7 +137,6 @@ class _InvocationMatcher {
}
}
-
class Behavior {
final _InvocationMatcher _matcher;
@@ -232,7 +223,6 @@ class Behavior {
}
}
-
class Verifier {
final TypedMock _mock;
final _InvocationMatcher _matcher;
@@ -313,7 +303,6 @@ class Verifier {
}
}
-
/// A class to extend mocks from.
/// It supports specifying behavior using [when] and validation of interactions
/// using [verify].
@@ -368,7 +357,6 @@ class TypedMock {
}
}
-
/// [ArgumentMatcher] checks whether the given argument satisfies some
/// condition.
abstract class ArgumentMatcher {
@@ -378,7 +366,6 @@ abstract class ArgumentMatcher {
bool matches(val);
}
-
class _ArgumentMatcher_equals extends ArgumentMatcher {
final expected;
@@ -390,7 +377,6 @@ class _ArgumentMatcher_equals extends ArgumentMatcher {
}
}
-
class _ArgumentMatcher_anyBool extends ArgumentMatcher {
const _ArgumentMatcher_anyBool();
@@ -403,7 +389,6 @@ class _ArgumentMatcher_anyBool extends ArgumentMatcher {
/// Matches any [bool] value.
final anyBool = const _ArgumentMatcher_anyBool() as dynamic;
-
class _ArgumentMatcher_anyInt extends ArgumentMatcher {
const _ArgumentMatcher_anyInt();
@@ -416,7 +401,6 @@ class _ArgumentMatcher_anyInt extends ArgumentMatcher {
/// Matches any [int] value.
final anyInt = const _ArgumentMatcher_anyInt() as dynamic;
-
class _ArgumentMatcher_anyObject extends ArgumentMatcher {
const _ArgumentMatcher_anyObject();
@@ -429,7 +413,6 @@ class _ArgumentMatcher_anyObject extends ArgumentMatcher {
/// Matches any [Object] (or subclass) value.
final anyObject = const _ArgumentMatcher_anyObject() as dynamic;
-
class _ArgumentMatcher_anyString extends ArgumentMatcher {
const _ArgumentMatcher_anyString();
« no previous file with comments | « pkg/testing/lib/testing.dart ('k') | pkg/typed_mock/test/typed_mock_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698