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

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

Issue 12217148: Remove deprecated functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/unittest.dart
===================================================================
--- pkg/unittest/lib/unittest.dart (revision 18401)
+++ pkg/unittest/lib/unittest.dart (working copy)
@@ -233,34 +233,6 @@
Map testState = {};
/**
- * (Deprecated) Evaluates the [function] and validates that it throws an
- * exception. If [callback] is provided, then it will be invoked with the
- * thrown exception. The callback may do any validation it wants. In addition,
- * if it returns `false`, that also indicates an expectation failure.
- */
-void expectThrow(function, [bool callback(exception)]) {
- bool threw = false;
- try {
- function();
- } catch (e) {
- threw = true;
-
- // Also let the callback look at it.
- if (callback != null) {
- var result = callback(e);
-
- // If the callback explicitly returned false, treat that like an
- // expectation too. (If it returns null, though, don't.)
- if (result == false) {
- fail('Exception:\n$e\ndid not match expectation.');
- }
- }
- }
-
- if (threw != true) fail('An expected exception was not thrown.');
-}
-
-/**
* Creates a new test case with the given description and body. The
* description will include the descriptions of any surrounding group()
* calls.
@@ -271,25 +243,6 @@
}
/**
- * (Deprecated) Creates a new async test case with the given description
- * and body. The description will include the descriptions of any surrounding
- * group() calls.
- */
-// TODO(sigmund): deprecate this API
-void asyncTest(String spec, int callbacks, TestFunction body) {
- ensureInitialized();
-
- final testCase = new TestCase(
- _tests.length + 1, _fullSpec(spec), body, callbacks);
- _tests.add(testCase);
-
- if (callbacks < 1) {
- testCase.error(
- 'Async tests must wait for at least one callback ', '');
- }
-}
-
-/**
* Creates a new test case with the given description and body. The
* description will include the descriptions of any surrounding group()
* calls.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698