Skip to content

Commit

Permalink
Makes compilation pass on 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
atuleu committed Jun 16, 2022
1 parent 82753d3 commit 69e1197
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
12 changes: 8 additions & 4 deletions src/fort/myrmidon/QueryUTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,14 @@ TEST_F(QueryUTest,ComputeAntInteractions) {
EXPECT_ANT_INTERACTION_EQ(*interactions[i],
*expected.Interactions[i])
<< " With i: " << i << std::endl
<< "Expected Interaction End: " << expected.Interactions[i]->End << std::endl
<< " Acutal Interaction End: " << interactions[i]->End << std::endl
<< " Expected Segment End: " << std::get<0>(expected.Interactions[i]->Trajectories).first.EndTime() << std::endl
<< " Actual Segment End: " << std::get<0>(interactions[i]->Trajectories).first.EndTime() << std::endl;
<< "Expected Interaction End: "
<< ::testing::PrintToString(expected.Interactions[i]->End) << std::endl
<< " Actual Interaction End: "
<< ::testing::PrintToString(interactions[i]->End) << std::endl
<< " Expected Segment End: "
<< ::testing::PrintToString(std::get<0>(expected.Interactions[i]->Trajectories).first.EndTime()) << std::endl
<< " Actual Segment End: "
<< ::testing::PrintToString(std::get<0>(interactions[i]->Trajectories).first.EndTime()) << std::endl;

}
}
Expand Down
5 changes: 4 additions & 1 deletion src/fort/myrmidon/ShapesUTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ TEST_F(ShapesUTest,TestCaspuleCollision) {

bool res = Capsule::Intersect(a.C1(),a.C2(),a.R1(),a.R2(),
b.C1(),b.C2(),b.R1(),b.R2());
EXPECT_EQ(res,d.Expected) << " Intersecting " << a << " and " << b;
EXPECT_EQ(res,d.Expected) << " Intersecting "
<< ::testing::PrintToString(a)
<< " and "
<< ::testing::PrintToString(b);
}
}

Expand Down
10 changes: 6 additions & 4 deletions src/fort/myrmidon/UtilsUTest.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <utility>
#include <iostream>

#include <fort/time/Time.hpp>
#include <fort/myrmidon/types/Collision.hpp>
#include <utility>

#include "UtilsUTest.hpp"

Expand All @@ -20,9 +22,9 @@
#define failure_helper(aExpr,bExpr,a,b,field) \
::testing::AssertionFailure() \
<< "Value of: " << aExpr << "." << #field << std::endl \
<< " Actual: " << a.field << std::endl \
<< " Actual: " << ::testing::PrintToString(a.field) << std::endl \
<< "Expected: " << bExpr << "." << #field << std::endl \
<< "Which is: " << b.field
<< "Which is: " << ::testing::PrintToString(b.field)

::testing::AssertionResult AssertTimeEqual(const char * aExpr,
const char * bExpr,
Expand Down Expand Up @@ -494,7 +496,7 @@ AssertCollisionFrameEqual(const char * aExpr,
if ( j == a.Collisions.size() ) {
return ::testing::AssertionFailure()
<< "Could not found collision "
<< b.Collisions[i].IDs
<< ::testing::PrintToString(b.Collisions[i].IDs)
<< " in " << aExpr << ".Collisions";
}
tmp = AssertCollisionEqual((std::string(aExpr)+".Collision[" + std::to_string(j) + "]").c_str(),
Expand Down
4 changes: 3 additions & 1 deletion src/fort/myrmidon/UtilsUTest.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include <gtest/gtest.h>

#include <Eigen/Core>

Expand All @@ -9,6 +8,9 @@
#include <fort/myrmidon/types/Value.hpp>
#include <fort/myrmidon/types/TagStatistics.hpp>


#include <gtest/gtest.h>

namespace fort {
class Time;
namespace myrmidon {
Expand Down
2 changes: 1 addition & 1 deletion src/fort/myrmidon/priv/TagStatisticsUTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST_F(TagStatisticsUTest,ComputeAndUpdatesGap) {
for ( const auto & d : testdata ) {
auto stat = TagStatisticsHelper::Create(0,t);
auto gap = TagStatisticsHelper::ComputeGap(t,t.Add(d.D));
EXPECT_EQ(gap,d.H) << " testing for " << d.D;
EXPECT_EQ(gap,d.H) << " testing for " << ::testing::PrintToString(d.D);
TagStatisticsHelper::UpdateGaps(stat,t,t.Add(d.D));
if ( d.H == 0 ) {
EXPECT_EQ(stat.Counts.sum(),1);
Expand Down

0 comments on commit 69e1197

Please sign in to comment.