OLD | NEW |
---|---|
(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)) | |
OLD | NEW |