Roll ANGLE.
[chromium-blink-merge.git] / mojo / python / tests / bindings_constants_unittest.py
blobea8c651b9566d4175723f03581c33b03c90ffdce
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.
5 import math
6 import unittest
8 # Generated files
9 # pylint: disable=F0401
10 import sample_service_mojom
13 class ConstantBindingsTest(unittest.TestCase):
15 def testConstantGeneration(self):
16 self.assertEquals(sample_service_mojom.TWELVE, 12)
17 self.assertEquals(sample_service_mojom.TOO_BIG_FOR_SIGNED_INT64,
18 9999999999999999999)
19 self.assertEquals(sample_service_mojom.DOUBLE_INFINITY,
20 float('inf'))
21 self.assertEquals(sample_service_mojom.DOUBLE_NEGATIVE_INFINITY,
22 float('-inf'))
23 self.assertTrue(math.isnan(sample_service_mojom.DOUBLE_NA_N))
24 self.assertEquals(sample_service_mojom.FLOAT_INFINITY,
25 float('inf'))
26 self.assertEquals(sample_service_mojom.FLOAT_NEGATIVE_INFINITY,
27 float('-inf'))
28 self.assertTrue(math.isnan(sample_service_mojom.FLOAT_NA_N))