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

Side by Side Diff: pkg/analysis_server/test/mock_sdk.dart

Issue 1956443003: Update mock SDK 'double'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library testing.mock_sdk; 5 library testing.mock_sdk;
6 6
7 import 'package:analyzer/file_system/file_system.dart' as resource; 7 import 'package:analyzer/file_system/file_system.dart' as resource;
8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource;
9 import 'package:analyzer/src/context/context.dart'; 9 import 'package:analyzer/src/context/context.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 29 matching lines...) Expand all
40 external factory String.fromCharCodes(Iterable<int> charCodes, 40 external factory String.fromCharCodes(Iterable<int> charCodes,
41 [int start = 0, int end]); 41 [int start = 0, int end]);
42 bool get isEmpty => false; 42 bool get isEmpty => false;
43 bool get isNotEmpty => false; 43 bool get isNotEmpty => false;
44 int get length => 0; 44 int get length => 0;
45 String toUpperCase(); 45 String toUpperCase();
46 List<int> get codeUnits; 46 List<int> get codeUnits;
47 } 47 }
48 48
49 class bool extends Object {} 49 class bool extends Object {}
50
50 abstract class num implements Comparable<num> { 51 abstract class num implements Comparable<num> {
51 bool operator <(num other); 52 bool operator <(num other);
52 bool operator <=(num other); 53 bool operator <=(num other);
53 bool operator >(num other); 54 bool operator >(num other);
54 bool operator >=(num other); 55 bool operator >=(num other);
55 num operator +(num other); 56 num operator +(num other);
56 num operator -(num other); 57 num operator -(num other);
57 num operator *(num other); 58 num operator *(num other);
59 num operator /(num other);
60 int operator ^(int other);
61 int operator &(int other);
62 int operator |(int other);
63 int operator <<(int other);
64 int operator >>(int other);
65 int operator ~/(num other);
58 num operator %(num other); 66 num operator %(num other);
59 num operator /(num other); 67 int operator ~();
60 int toInt(); 68 int toInt();
69 double toDouble();
61 num abs(); 70 num abs();
62 int round(); 71 int round();
63 } 72 }
73
64 abstract class int extends num { 74 abstract class int extends num {
65 bool get isEven => false; 75 bool get isEven => false;
66 int operator -(); 76 int operator -();
67 external static int parse(String source, 77 external static int parse(String source,
68 { int radix, 78 { int radix,
69 int onError(String source) }); 79 int onError(String source) });
70 } 80 }
71 class double extends num {} 81
82 abstract class double extends num {
83 static const double NAN = 0.0 / 0.0;
84 static const double INFINITY = 1.0 / 0.0;
85 static const double NEGATIVE_INFINITY = -INFINITY;
86 static const double MIN_POSITIVE = 5e-324;
87 static const double MAX_FINITE = 1.7976931348623157e+308;
88
89 double remainder(num other);
90 double operator +(num other);
91 double operator -(num other);
92 double operator *(num other);
93 double operator %(num other);
94 double operator /(num other);
95 int operator ~/(num other);
96 double operator -();
97 double abs();
98 double get sign;
99 int round();
100 int floor();
101 int ceil();
102 int truncate();
103 double roundToDouble();
104 double floorToDouble();
105 double ceilToDouble();
106 double truncateToDouble();
107 external static double parse(String source,
108 [double onError(String source)]);
109 }
110
72 class DateTime extends Object {} 111 class DateTime extends Object {}
73 class Null extends Object {} 112 class Null extends Object {}
74 113
75 class Deprecated extends Object { 114 class Deprecated extends Object {
76 final String expires; 115 final String expires;
77 const Deprecated(this.expires); 116 const Deprecated(this.expires);
78 } 117 }
79 const Object deprecated = const Deprecated("next release"); 118 const Object deprecated = const Deprecated("next release");
80 119
81 class Iterator<E> { 120 class Iterator<E> {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 bool get isInternal => shortName.startsWith('dart:_'); 371 bool get isInternal => shortName.startsWith('dart:_');
333 372
334 @override 373 @override
335 bool get isShared => throw unimplemented; 374 bool get isShared => throw unimplemented;
336 375
337 @override 376 @override
338 bool get isVmLibrary => throw unimplemented; 377 bool get isVmLibrary => throw unimplemented;
339 378
340 UnimplementedError get unimplemented => new UnimplementedError(); 379 UnimplementedError get unimplemented => new UnimplementedError();
341 } 380 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698