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

Unified Diff: tests/corelib/collection_to_string_test.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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
Index: tests/corelib/collection_to_string_test.dart
diff --git a/tests/corelib/collection_to_string_test.dart b/tests/corelib/collection_to_string_test.dart
index 268f58915ba23168be159fb63bbefe9a5caf3e19..070a561e8fe67246ac2b00413465c2fbe2b25f12 100644
--- a/tests/corelib/collection_to_string_test.dart
+++ b/tests/corelib/collection_to_string_test.dart
@@ -78,7 +78,7 @@ void smokeTest() {
void exactTest() {
for (int i = 0; i < NUM_TESTS; i++) {
// Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes
- int size = Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt();
+ int size = Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).truncate();
StringBuffer stringRep = new StringBuffer();
Object o = randomCollection(size, stringRep, exact:true);
@@ -100,7 +100,7 @@ void exactTest() {
void inexactTest() {
for (int i = 0; i < NUM_TESTS; i++) {
// Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes
- int size = Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt();
+ int size = Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).truncate();
StringBuffer stringRep = new StringBuffer();
Object o = randomCollection(size, stringRep, exact:false);

Powered by Google App Engine
This is Rietveld 408576698