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

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: another windows fix 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
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d303272a44eb1f4eac1cdff6be45f7257bc936d4 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,13 @@ 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@29 = float.INFINITY;
+ float a30@30 = float.NEGATIVE_INFINITY;
+ float a31@31 = float.NAN;
};
struct StructWithHoleV1 {
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698