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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/mock_sdk.dart
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index 335a9b31f164d515de8b9e1cd94692b45da8221d..504d536a1736d6971936425cf0f36effdfa61132 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -47,6 +47,7 @@ abstract class String implements Comparable<String> {
}
class bool extends Object {}
+
abstract class num implements Comparable<num> {
bool operator <(num other);
bool operator <=(num other);
@@ -55,12 +56,21 @@ abstract class num implements Comparable<num> {
num operator +(num other);
num operator -(num other);
num operator *(num other);
- num operator %(num other);
num operator /(num other);
+ int operator ^(int other);
+ int operator &(int other);
+ int operator |(int other);
+ int operator <<(int other);
+ int operator >>(int other);
+ int operator ~/(num other);
+ num operator %(num other);
+ int operator ~();
int toInt();
+ double toDouble();
num abs();
int round();
}
+
abstract class int extends num {
bool get isEven => false;
int operator -();
@@ -68,7 +78,36 @@ abstract class int extends num {
{ int radix,
int onError(String source) });
}
-class double extends num {}
+
+abstract class double extends num {
+ static const double NAN = 0.0 / 0.0;
+ static const double INFINITY = 1.0 / 0.0;
+ static const double NEGATIVE_INFINITY = -INFINITY;
+ static const double MIN_POSITIVE = 5e-324;
+ static const double MAX_FINITE = 1.7976931348623157e+308;
+
+ double remainder(num other);
+ double operator +(num other);
+ double operator -(num other);
+ double operator *(num other);
+ double operator %(num other);
+ double operator /(num other);
+ int operator ~/(num other);
+ double operator -();
+ double abs();
+ double get sign;
+ int round();
+ int floor();
+ int ceil();
+ int truncate();
+ double roundToDouble();
+ double floorToDouble();
+ double ceilToDouble();
+ double truncateToDouble();
+ external static double parse(String source,
+ [double onError(String source)]);
+}
+
class DateTime extends Object {}
class Null extends Object {}
« 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