Skip to content

Commit

Permalink
test some negative double values as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas committed Jun 6, 2018
1 parent 4b8c886 commit 568a6d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test_cli/test/test_params_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def check_params():
assert ParameterType.PARAMETER_DOUBLE == resp.values[0].type
assert ParameterType.PARAMETER_DOUBLE == resp.values[1].type
assert pytest.approx(3.14) == resp.values[0].double_value
assert pytest.approx(2.718) == resp.values[1].double_value
assert pytest.approx(-2.718) == resp.values[1].double_value
return True
print(resp)
return False
Expand All @@ -121,7 +121,7 @@ def check_params():
initial_params_node:
ros__parameters:
d1: 3.14
d2: 2.718
d2: -2.718
""")
yaml_file.flush()

Expand Down Expand Up @@ -221,8 +221,8 @@ def check_params():
if 2 == len(resp.values):
assert ParameterType.PARAMETER_DOUBLE_ARRAY == resp.values[0].type
assert ParameterType.PARAMETER_DOUBLE_ARRAY == resp.values[1].type
assert resp.values[0].double_array_value == pytest.approx([3.14, 2.718])
assert resp.values[1].double_array_value == pytest.approx([1234.5, 9999.0])
assert resp.values[0].double_array_value == pytest.approx([3.14, -2.718])
assert resp.values[1].double_array_value == pytest.approx([1234.5, -9999.0])
return True
print(resp)
return False
Expand All @@ -231,8 +231,8 @@ def check_params():
yaml_file.write("""
initial_params_node:
ros__parameters:
da1: [3.14, 2.718]
da2: [1234.5, 9999.0]
da1: [3.14, -2.718]
da2: [1234.5, -9999.0]
""")
yaml_file.flush()

Expand Down

0 comments on commit 568a6d1

Please sign in to comment.