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

Unified Diff: mojo/public/interfaces/bindings/tests/sample_service.mojom

Issue 474063002: Mojo: add support for {double,float}.{INFINITY,NEGATIVE_INFINITY,NAN} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 4 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: mojo/public/interfaces/bindings/tests/sample_service.mojom
diff --git a/mojo/public/interfaces/bindings/tests/sample_service.mojom b/mojo/public/interfaces/bindings/tests/sample_service.mojom
index e7803d8483709fd201f6107632ec2594dbd5a722..7f13a72cb8215a3be4b633ae5ff03e7d5537aa69 100644
--- a/mojo/public/interfaces/bindings/tests/sample_service.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_service.mojom
@@ -11,6 +11,14 @@ module sample {
const uint8 kTwelve = 12;
const uint64 kTooBigForSignedInt64 = 9999999999999999999;
+const double kDoubleInfinity = double.INFINITY;
+const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY;
+const double kDoubleNaN = double.NAN;
+
+const float kFloatInfinity = float.INFINITY;
+const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY;
+const float kFloatNaN = float.NAN;
+
struct Bar {
enum Type {
VERTICAL = 1,
@@ -76,6 +84,14 @@ struct DefaultsTest {
uint64 a23@23 = 0xFFFFFFFFFFFFFFFF;
int64 a24@24 = 0x123456789;
int64 a25@25 = -0x123456789;
+
+ double a26@26 = double.INFINITY;
+ double a27@27 = double.NEGATIVE_INFINITY;
+ double a28@28 = double.NAN;
+
+ float a29@26 = float.INFINITY;
+ float a30@27 = float.NEGATIVE_INFINITY;
+ float a31@28 = float.NAN;
};
struct StructWithHoleV1 {

Powered by Google App Engine
This is Rietveld 408576698