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

Unified Diff: tests/corelib/sort_helper.dart

Issue 10692157: Clean sort_helper.dart a bit: remove printing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: tests/corelib/sort_helper.dart
diff --git a/tests/corelib/sort_helper.dart b/tests/corelib/sort_helper.dart
index 3e9dd77774d49390f40eecc734ac286283537f81..59dac5816167b6d6ae024124e56d7fc4b8615327 100644
--- a/tests/corelib/sort_helper.dart
+++ b/tests/corelib/sort_helper.dart
@@ -11,15 +11,6 @@ class SortHelper {
testSortDoubleLists();
}
- void printList(List a) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < a.length; i++) {
- if (i != 0) buffer.add(",");
- buffer.add(a[i]);
- }
- print("[$buffer]");
- }
-
bool isSorted(List a) {
for (int i = 1; i < a.length; i++) {
if (compareFunction(a[i - 1], a[i]) > 0) {
@@ -122,13 +113,8 @@ class SortHelper {
}
void testSort(List a) {
- final bool log = false;
- if (log) printList(a);
sortFunction(a);
- if (log) printList(a);
- bool sorted = isSorted(a);
- Expect.equals(true, sorted);
- if (log) print(sorted);
+ Expect.isTrue(isSorted(a));
}
void testInsertionSort(int i1, int i2, int i3, int i4) {
« 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