| Index: mojo/python/tests/bindings_constants_unittest.py
|
| diff --git a/mojo/python/tests/bindings_constants_unittest.py b/mojo/python/tests/bindings_constants_unittest.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2b8aceeb526f3616ef7965996dc8885b24fade1a
|
| --- /dev/null
|
| +++ b/mojo/python/tests/bindings_constants_unittest.py
|
| @@ -0,0 +1,28 @@
|
| +# Copyright 2014 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import math
|
| +import unittest
|
| +
|
| +# Generated files
|
| +# pylint: disable=F0401
|
| +import sample_service_mojom
|
| +
|
| +
|
| +class ConstantBindingsTest(unittest.TestCase):
|
| +
|
| + def test_constant_generation(self):
|
| + self.assertEquals(sample_service_mojom.TWELVE, 12)
|
| + self.assertEquals(sample_service_mojom.TOO_BIG_FOR_SIGNED_INT64,
|
| + 9999999999999999999)
|
| + self.assertEquals(sample_service_mojom.DOUBLE_INFINITY,
|
| + float('inf'))
|
| + self.assertEquals(sample_service_mojom.DOUBLE_NEGATIVE_INFINITY,
|
| + float('-inf'))
|
| + self.assertTrue(math.isnan(sample_service_mojom.DOUBLE_NA_N))
|
| + self.assertEquals(sample_service_mojom.FLOAT_INFINITY,
|
| + float('inf'))
|
| + self.assertEquals(sample_service_mojom.FLOAT_NEGATIVE_INFINITY,
|
| + float('-inf'))
|
| + self.assertTrue(math.isnan(sample_service_mojom.FLOAT_NA_N))
|
|
|