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

Side by Side Diff: dart/frog/leg/lib/mockimpl.dart

Issue 9421025: Improve double implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 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 // Mocks of classes and interfaces that Leg cannot read directly. 5 // Mocks of classes and interfaces that Leg cannot read directly.
6 6
7 // TODO(ahe): Remove this file. 7 // TODO(ahe): Remove this file.
8 8
9 class JSSyntaxRegExp implements RegExp { 9 class JSSyntaxRegExp implements RegExp {
10 JSSyntaxRegExp(String pattern, 10 JSSyntaxRegExp(String pattern,
(...skipping 26 matching lines...) Expand all
37 37
38 static String join(List<String> strings, String separator) { 38 static String join(List<String> strings, String separator) {
39 throw "StringBase.join is not implemented"; 39 throw "StringBase.join is not implemented";
40 } 40 }
41 41
42 static String concatAll(List<String> strings) { 42 static String concatAll(List<String> strings) {
43 throw "StringBase.concatAll is not implemented"; 43 throw "StringBase.concatAll is not implemented";
44 } 44 }
45 } 45 }
46 46
47 class MathNatives {
48 static int parseInt(String str) {
49 throw 'MathNatives.parseInt is not implemented';
50 }
51
52 static double parseDouble(String str) {
53 throw 'MathNatives.parseDouble is not implemented';
54 }
55
56 static double sqrt(num value) {
57 throw 'MathNatives.sqrt is not implemented';
58 }
59
60 static double sin(num value) {
61 throw 'MathNatives.sin is not implemented';
62 }
63
64 static double cos(num value) {
65 throw 'MathNatives.cos is not implemented';
66 }
67
68 static double tan(num value) {
69 throw 'MathNatives.tan is not implemented';
70 }
71
72 static double acos(num value) {
73 throw 'MathNatives.acos is not implemented';
74 }
75
76 static double asin(num value) {
77 throw 'MathNatives.asin is not implemented';
78 }
79
80 static double atan(num value) {
81 throw 'MathNatives.atan is not implemented';
82 }
83
84 static double atan2(num a, num b) {
85 throw 'MathNatives.atan2 is not implemented';
86 }
87
88 static double exp(num value) {
89 throw 'MathNatives.exp is not implemented';
90 }
91
92 static double log(num value) {
93 throw 'MathNatives.log is not implemented';
94 }
95
96 static num pow(num value, num exponent) {
97 throw 'MathNatives.pow is not implemented';
98 }
99
100 static double random() {
101 throw 'MathNatives.random is not implemented';
102 }
103 }
104
105 class TimeZoneImplementation implements TimeZone { 47 class TimeZoneImplementation implements TimeZone {
106 const TimeZoneImplementation.utc() : isUtc = true; 48 const TimeZoneImplementation.utc() : isUtc = true;
107 TimeZoneImplementation.local() : isUtc = false; 49 TimeZoneImplementation.local() : isUtc = false;
108 50
109 bool operator ==(Object other) { 51 bool operator ==(Object other) {
110 if (!(other is TimeZoneImplementation)) return false; 52 if (!(other is TimeZoneImplementation)) return false;
111 return isUtc == other.isUtc; 53 return isUtc == other.isUtc;
112 } 54 }
113 55
114 final bool isUtc; 56 final bool isUtc;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 factory List([int length]) => Primitives.newList(length); 431 factory List([int length]) => Primitives.newList(length);
490 factory List.from(Iterable<E> other) { 432 factory List.from(Iterable<E> other) {
491 List<E> result = new List<E>(); 433 List<E> result = new List<E>();
492 Iterator<E> iterator = other.iterator(); 434 Iterator<E> iterator = other.iterator();
493 while (iterator.hasNext()) { 435 while (iterator.hasNext()) {
494 result.add(iterator.next()); 436 result.add(iterator.next());
495 } 437 }
496 return result; 438 return result;
497 } 439 }
498 } 440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698