Skip to content

Commit

Permalink
Compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Jul 21, 2024
1 parent ce7ce2b commit fc92a4f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wpiutil/src/test/native/cpp/DataLogTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ TEST_F(DataLogTest, FloatAppend) {
TEST_F(DataLogTest, FloatUpdate) {
wpi::log::FloatLogEntry entry{log, "a", 5};
ASSERT_FALSE(entry.GetLastValue().has_value());
entry.Update(0.0, 7);
entry.Update(0.0f, 7);
log.Flush();
ASSERT_EQ(data.size(), 47u);
ASSERT_TRUE(entry.GetLastValue().has_value());
ASSERT_EQ(entry.GetLastValue().value(), 0.0);
entry.Update(0.0, 8);
ASSERT_EQ(entry.GetLastValue().value(), 0.0f);
entry.Update(0.0f, 8);
log.Flush();
ASSERT_EQ(data.size(), 47u);
entry.Update(0.1, 9);
entry.Update(0.1f, 9);
log.Flush();
ASSERT_EQ(data.size(), 55u);
ASSERT_TRUE(entry.GetLastValue().has_value());
Expand Down Expand Up @@ -385,27 +385,27 @@ TEST_F(DataLogTest, FloatArrayAppendEmpty) {

TEST_F(DataLogTest, FloatArrayAppend) {
wpi::log::FloatArrayLogEntry entry{log, "a", 5};
entry.Append({1.0}, 7);
entry.Append({1.0f}, 7);
log.Flush();
ASSERT_EQ(data.size(), 49u);
}

TEST_F(DataLogTest, FloatArrayUpdate) {
wpi::log::FloatArrayLogEntry entry{log, "a", 5};
ASSERT_FALSE(entry.GetLastValue().has_value());
entry.Update({1.0}, 7);
entry.Update({1.0f}, 7);
log.Flush();
ASSERT_EQ(data.size(), 49u);
ASSERT_TRUE(entry.GetLastValue().has_value());
ASSERT_EQ(entry.GetLastValue().value(), std::vector<float>{1.0});
entry.Update({1.0}, 8);
ASSERT_EQ(entry.GetLastValue().value(), std::vector<float>{1.0f});
entry.Update({1.0f}, 8);
log.Flush();
ASSERT_EQ(data.size(), 49u);
entry.Update({2.0}, 9);
entry.Update({2.0f}, 9);
log.Flush();
ASSERT_EQ(data.size(), 57u);
ASSERT_TRUE(entry.GetLastValue().has_value());
ASSERT_EQ(entry.GetLastValue().value(), std::vector<float>{2.0});
ASSERT_EQ(entry.GetLastValue().value(), std::vector<float>{2.0f});
entry.Update(std::span<const float>{}, 10);
log.Flush();
ASSERT_EQ(data.size(), 61u);
Expand Down

0 comments on commit fc92a4f

Please sign in to comment.