Skip to content

Commit

Permalink
revert test change and remove unnecessary list item
Browse files Browse the repository at this point in the history
  • Loading branch information
gerkey committed Apr 5, 2017
1 parent 5db496c commit 00901e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rosidl_generator_c/msg/PrimitiveValues.msg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bool def_bool_1 true
bool def_bool_2 false
byte def_byte 66
char def_char 67
char def_char -66
float32 def_float32 1.125
float64 def_float64 1.125
int8 def_int8 3
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/rosidl_generator_c/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def primitive_value_to_c(type_, value):
if type_ == 'bool':
return 'true' if value else 'false'

if type_ in ['byte', 'char', 'signed char', 'int8', 'int16', 'int32', 'int64']:
if type_ in ['byte', 'char', 'int8', 'int16', 'int32', 'int64']:
return str(value)

if type_ in ['uint8', 'uint16', 'uint32', 'uint64']:
Expand Down
2 changes: 1 addition & 1 deletion rosidl_generator_c/test/test_interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int test_primitives_default_value(void)
EXPECT_EQ(true, primitive_values->def_bool_1);
EXPECT_EQ(false, primitive_values->def_bool_2);
EXPECT_EQ(66, primitive_values->def_byte);
EXPECT_EQ(67, primitive_values->def_char);
EXPECT_EQ(-66, primitive_values->def_char);
EXPECT_EQ(1.125f, primitive_values->def_float32);
EXPECT_EQ(1.125, primitive_values->def_float64);
EXPECT_EQ(3, primitive_values->def_int8);
Expand Down

0 comments on commit 00901e5

Please sign in to comment.