Salome HOME
Add ModelHighAPI & ConstructionAPI pachages
[modules/shaper.git] / src / ModelHighAPI / Test / TestDouble.py
1 import unittest
2
3 import ModelHighAPI
4
5 class DoubleTestCase(unittest.TestCase):
6
7     def test_create_default(self):
8         default = ModelHighAPI.ModelHighAPI_Double()
9
10     def test_create_from_double(self):
11         from_double = ModelHighAPI.ModelHighAPI_Double(100.)
12         self.assertEqual(100., from_double.value())
13
14     def test_create_from_text(self):
15         from_string = ModelHighAPI.ModelHighAPI_Double("200 + x")
16         self.assertEqual("200 + x", from_string.text())
17     
18
19 if __name__ == "__main__":
20     unittest.main()