mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-13 05:19:51 +08:00
Imu motion predictor (#1791)
* Imu motion predictor * simplified parameters * refactored odom's imu init orientation * fixing sign issue with x86-64-v3 * fixing M_PI not defined in tests * Added auto gravity estimation mode * Fixing crash on windows when uFormat() is to long
This commit is contained in:
@@ -201,3 +201,14 @@ TEST(UConversionTest, UFormat)
|
||||
EXPECT_NE(result.find("42"), std::string::npos);
|
||||
}
|
||||
|
||||
TEST(UConversionTest, UFormatLongerThanItsFirstBuffer)
|
||||
{
|
||||
// Over the 1024 bytes uFormat first tries: formatted whole, not truncated (MSVC's
|
||||
// checked vsnprintf_s used to abort the process instead).
|
||||
const std::string longText(3000, 'a');
|
||||
std::string result = uFormat("%s %d", longText.c_str(), 42);
|
||||
EXPECT_EQ(result, longText + " 42");
|
||||
result = uFormat("%s", std::string(1023, 'b').c_str());
|
||||
EXPECT_EQ(result, std::string(1023, 'b'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user