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

Side by Side Diff: mojo/python/tests/bindings_constants_unittest.py

Issue 517353002: mojo: Starting generator for python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import math
6 import unittest
7
8 # Generated files
9 import sample_service_mojom
10
11
12 class ConstantBindingsTest(unittest.TestCase):
13
14 def test_constant_generation(self):
15 self.assertEquals(sample_service_mojom.TWELVE, 12)
16 self.assertEquals(sample_service_mojom.TOO_BIG_FOR_SIGNED_INT64,
17 9999999999999999999)
18 self.assertEquals(sample_service_mojom.DOUBLE_INFINITY,
19 float('inf'))
20 self.assertEquals(sample_service_mojom.DOUBLE_NEGATIVE_INFINITY,
21 float('-inf'))
22 self.assertTrue(math.isnan(sample_service_mojom.DOUBLE_NA_N))
pkl (ping after 24h if needed) 2014/09/01 12:52:02 Shouldn't DOUBLE_NA_N be DOUBLE_NAN instead?
qsr 2014/09/01 14:19:38 The issue is that the object is name NaN in the id
23 self.assertEquals(sample_service_mojom.FLOAT_INFINITY,
24 float('inf'))
25 self.assertEquals(sample_service_mojom.FLOAT_NEGATIVE_INFINITY,
26 float('-inf'))
27 self.assertTrue(math.isnan(sample_service_mojom.FLOAT_NA_N))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698