Enable compiler errors for implicit switch case fallthroughs.
Also unify warning options across Clang and GCC and fix minor issues that was surfaced by this. PiperOrigin-RevId: 508619655 Change-Id: I59b777bf2dfea4422485670e2427c7d3f5cf6405
This commit is contained in:
committed by
Copybara-Service
parent
8a53a33fd1
commit
5e989d18c3
+7
-1
@@ -21,7 +21,13 @@ macro(mujoco_test name)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs PROPERTIES)
|
||||
cmake_parse_arguments(_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
cmake_parse_arguments(
|
||||
_ARGS
|
||||
"${options}"
|
||||
"${oneValueArgs}"
|
||||
"${multiValueArgs}"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
add_executable(${name} ${name}.cc)
|
||||
target_link_libraries(${name} gtest_main mujoco)
|
||||
|
||||
@@ -19,7 +19,12 @@ mujoco_test(user_objects_test)
|
||||
target_link_libraries(user_objects_test fixture gmock)
|
||||
|
||||
mujoco_test(user_mesh_test)
|
||||
target_link_libraries(user_mesh_test fixture gmock absl::str_format)
|
||||
target_link_libraries(
|
||||
user_mesh_test
|
||||
fixture
|
||||
gmock
|
||||
absl::str_format
|
||||
)
|
||||
|
||||
mujoco_test(user_composite_test)
|
||||
target_link_libraries(user_composite_test fixture gmock)
|
||||
|
||||
@@ -917,8 +917,8 @@ TEST_F(XMLWriterLocaleTest, IgnoresLocale) {
|
||||
mj_deleteModel(model);
|
||||
|
||||
// Test that MuJoCo doesn't override locales for subsequent calls.
|
||||
char formatted[7];
|
||||
std::snprintf(formatted, sizeof(formatted), "%f", 3.9375);
|
||||
char formatted[8];
|
||||
std::snprintf(formatted, sizeof(formatted), "%.4f", 3.9375);
|
||||
EXPECT_EQ(std::string(formatted), "3,9375");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user