Use std::string_view instead of absl::string_view in fixture.cc.
Clean up some lint warnings. Fixes #1306. PiperOrigin-RevId: 595988916 Change-Id: I0e8584ff8704ea7294cf649664ab447cb1d4ff46
This commit is contained in:
committed by
Copybara-Service
parent
ca023a6f28
commit
c59a33dd81
+6
-3
@@ -14,11 +14,14 @@
|
||||
|
||||
#include "test/fixture.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
@@ -107,7 +110,7 @@ mjModel* LoadModelFromPath(const char* model_path) {
|
||||
return model;
|
||||
}
|
||||
|
||||
const std::string GetFileContents(const char* path) {
|
||||
std::string GetFileContents(const char* path) {
|
||||
std::ifstream ifs;
|
||||
ifs.open(path, std::ifstream::in);
|
||||
EXPECT_FALSE(ifs.fail());
|
||||
@@ -116,7 +119,7 @@ const std::string GetFileContents(const char* path) {
|
||||
return sstream.str();
|
||||
}
|
||||
|
||||
const std::string SaveAndReadXml(const mjModel* model) {
|
||||
std::string SaveAndReadXml(const mjModel* model) {
|
||||
EXPECT_THAT(model, testing::NotNull());
|
||||
|
||||
constexpr int kMaxPathLen = 1024;
|
||||
|
||||
Reference in New Issue
Block a user