Move AsVector utility to fixture.h

PiperOrigin-RevId: 690577546
Change-Id: I2cebcffa1f2e3b0789f43e772e364c4762719ab3
This commit is contained in:
Yuval Tassa
2024-10-28 05:51:05 -07:00
committed by Copybara-Service
parent d95befaddd
commit a4a6248a06
15 changed files with 8 additions and 67 deletions
+5
View File
@@ -105,6 +105,11 @@ std::vector<mjtNum> GetCtrlNoise(const mjModel* m, int nsteps,
// Returns the name of the different field and the max difference.
mjtNum CompareModel(const mjModel* m1, const mjModel* m2, std::string& field);
// Returns a vector containing the elements of the array.
inline std::vector<mjtNum> AsVector(const mjtNum* array, int n) {
return std::vector<mjtNum>(array, array + n);
}
// Installs a mock filesystem via a resource provider. To obtain thread safety,
// each filesystem is scoped for individual unit tests with destructive
// operations not permitted.