Remove unused headers in test files.

PiperOrigin-RevId: 520610859
Change-Id: I5ac906b422a7c02737af85f6a2aea46206f0cb28
This commit is contained in:
Yuval Tassa
2023-03-30 05:25:41 -07:00
committed by Copybara-Service
parent 1d6a9e09bb
commit 0becf8fd98
9 changed files with 14 additions and 30 deletions
-1
View File
@@ -14,7 +14,6 @@
// Tests for engine/engine_core_smooth.c.
#include <cstddef>
#include <string>
#include <gmock/gmock.h>
-2
View File
@@ -17,9 +17,7 @@
#include "src/engine/engine_plugin.h"
#include <array>
#include <cstdint>
#include <cstring>
#include <sstream>
#include <vector>
-5
View File
@@ -14,11 +14,6 @@
// Tests for ray casting.
#include <array>
#include <cstddef>
#include <cstring>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <mujoco/mjdata.h>
-5
View File
@@ -14,11 +14,6 @@
// Tests for engine/engine_sensor.c.
#include <array>
#include <cstddef>
#include <cstdio>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <mujoco/mjmodel.h>
-1
View File
@@ -17,7 +17,6 @@
#include <cstring>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "src/engine/engine_util_errmem.h"
+14 -7
View File
@@ -26,13 +26,20 @@ namespace {
using ::testing::HasSubstr;
TEST_F(MujocoTest, PrintsMemoryWarning) {
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 10)), HasSubstr("1K bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 20)), HasSubstr("1M bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 30)), HasSubstr("1G bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 40)), HasSubstr("1T bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 50)), HasSubstr("1P bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 60)), HasSubstr("1E bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 30)+1), HasSubstr("1073741825 bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 10)),
HasSubstr("1K bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 20)),
HasSubstr("1M bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 30)),
HasSubstr("1G bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 40)),
HasSubstr("1T bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 50)),
HasSubstr("1P bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 60)),
HasSubstr("1E bytes"));
EXPECT_THAT(mju_warningText(mjWARN_CNSTRFULL, pow(2, 30) + 1),
HasSubstr("1073741825 bytes"));
}
} // namespace
-1
View File
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstddef>
#include <string>
#include <gmock/gmock.h>
-1
View File
@@ -15,7 +15,6 @@
// Tests for xml/xml_native_reader.cc.
#include <array>
#include <cstddef>
#include <limits>
#include <string>
-7
View File
@@ -18,22 +18,15 @@
#include <unistd.h>
#endif
#include <algorithm>
#include <array>
#include <clocale>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <absl/container/flat_hash_set.h>
#include <absl/strings/match.h>
#include <mujoco/mjmodel.h>
#include <mujoco/mjtnum.h>