Skip to content

Commit

Permalink
correct more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phlptp committed Nov 3, 2020
1 parent c6da45e commit e614b9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/helics/cpp98/Endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ class Endpoint {
&(data[0]),
static_cast<int>(data.size()),
time,

hThrowOnError());
}
/** send a string to a particular destination at a particular time
Expand All @@ -312,7 +311,7 @@ class Endpoint {
void sendToAt(const std::string& data,const std::string& dest, helics_time time )
{
helicsEndpointSendToAt(
ep, dest.c_str(), time, &(data[0]), static_cast<int>(data.size()), hThrowOnError());
ep, &(data[0]), static_cast<int>(data.size()), dest.c_str(), time, hThrowOnError());
}

/** send a vector of data to the target destination
Expand Down
8 changes: 4 additions & 4 deletions tests/helics/shared_library/test-message-federate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ TEST_P(mfed_simple_type_tests, send_receive)
EXPECT_TRUE(mFed1State == helics_state_execution);
std::string data(500, 'a');

CE(helicsEndpointSendToAt(epid, "ep2", 0.0, data.c_str(), 500, &err));
CE(helicsEndpointSendToAt(epid, data.c_str(), 500, "ep2", 0.0, &err));
helics_time time;
CE(time = helicsFederateRequestTime(mFed1, 1.0, &err));
EXPECT_EQ(time, 1.0);
Expand Down Expand Up @@ -136,7 +136,7 @@ TEST_P(mfed_simple_type_tests, send_receive_mobj)
EXPECT_TRUE(mFed1State == helics_state_execution);
std::string data(500, 'a');

CE(helicsEndpointSendToAt(epid, "ep2", 0.0, data.c_str(), 500, &err));
CE(helicsEndpointSendToAt(epid, data.c_str(), 500, "ep2", 0.0, &err));
helics_time time;
CE(time = helicsFederateRequestTime(mFed1, 1.0, &err));
EXPECT_EQ(time, 1.0);
Expand Down Expand Up @@ -251,8 +251,8 @@ TEST_P(mfed_type_tests, send_receive_2fed)
std::string data(500, 'a');
std::string data2(400, 'b');

CE(helicsEndpointSendToAt(epid, "ep2", 0.0, data.c_str(), 500, &err));
CE(helicsEndpointSendToAt(epid2, "fed0/ep1", 0.0, data2.c_str(), 400, &err));
CE(helicsEndpointSendToAt(epid, data.c_str(), 500, "ep2", 0.0, &err));
CE(helicsEndpointSendToAt(epid2, data2.c_str(), 400, "fed0/ep1", 0.0, &err));
// move the time to 1.0
helics_time time;
CE(helicsFederateRequestTimeAsync(mFed1, 1.0, &err));
Expand Down

0 comments on commit e614b9c

Please sign in to comment.