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

Side by Side Diff: runtime/vm/snapshot_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, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:isolate'; 5 import 'dart:isolate';
6 6
7 class Fields { 7 class Fields {
8 Fields(int i, int j) : fld1 = i, fld2 = j, fld5 = true {} 8 Fields(int i, int j) : fld1 = i, fld2 = j, fld5 = true {}
9 int fld1; 9 int fld1;
10 final int fld2; 10 final int fld2;
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 } 792 }
793 793
794 static void print(String str) { 794 static void print(String str) {
795 print(str); 795 print(str);
796 } 796 }
797 797
798 String getRandomString(int characters) { 798 String getRandomString(int characters) {
799 var result = ""; 799 var result = "";
800 for (var i = 0; i < characters; i++) { 800 for (var i = 0; i < characters; i++) {
801 result += Strings. 801 result += Strings.
802 createFromCodePoints([(25 * Math.random()).toInt() + 97]); 802 createFromCodePoints([(25 * Math.random()).truncate() + 97]);
Lasse Reichstein Nielsen 2013/01/04 10:29:42 This is idiomatic code where "floor" would be more
803 } 803 }
804 result += result; 804 result += result;
805 result += result; 805 result += result;
806 return result; 806 return result;
807 } 807 }
808 808
809 void run() { 809 void run() {
810 //JS Dromeaeo uses 16384 810 //JS Dromeaeo uses 16384
811 final ITERATE1 = 384; 811 final ITERATE1 = 384;
812 //JS Dromeaeo uses 80000 812 //JS Dromeaeo uses 80000
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 void processLines() { 1549 void processLines() {
1550 port.receive((message, SendPort replyTo) { 1550 port.receive((message, SendPort replyTo) {
1551 if (message == TERMINATION_MESSAGE) { 1551 if (message == TERMINATION_MESSAGE) {
1552 assert(replyTo == null); 1552 assert(replyTo == null);
1553 port.close(); 1553 port.close();
1554 } else { 1554 } else {
1555 replyTo.send(processLine(message), null); 1555 replyTo.send(processLine(message), null);
1556 } 1556 }
1557 }); 1557 });
1558 } 1558 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698