Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davschneller committed Nov 13, 2024
1 parent ca4e075 commit ab1821f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
unittest:
name: unittest
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
clang-tidy:
name: clang-tidy
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: apt-get
run: |
Expand Down
15 changes: 10 additions & 5 deletions tests/as/MPI.t.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ class TestMPI : public CxxTest::TestSuite {
if (m_scheduler->isExecutor()) {
m_scheduler->loop();

for (auto i = m_buffers.begin(); i != m_buffers.end(); i++)
for (const auto& i : m_buffers) {
TS_ASSERT_EQUALS(i, 43);
}
} else {
int buffer = 43;
async.addBuffer(&buffer, sizeof(int));
Expand Down Expand Up @@ -294,8 +295,9 @@ class TestMPI : public CxxTest::TestSuite {

TS_ASSERT_LESS_THAN_EQUALS(1, m_buffers.size());
TS_ASSERT_LESS_THAN_EQUALS(m_buffers.size(), 2);
for (auto i = m_buffers.begin(); i != m_buffers.end(); i++)
for (const auto& i : m_buffers) {
TS_ASSERT_EQUALS(i, 3);
}
} else {
int buffer = 3;
async.addSyncBuffer(&buffer, sizeof(int));
Expand All @@ -322,8 +324,9 @@ class TestMPI : public CxxTest::TestSuite {
m_scheduler->loop();

TS_ASSERT_EQUALS(m_buffers.size(), 1);
for (auto i = m_buffers.begin(); i != m_buffers.end(); i++)
for (const auto& i : m_buffers) {
TS_ASSERT_EQUALS(i, 3);
}
} else {
int buffer = 3;
async.addSyncBuffer(&buffer, sizeof(int), true);
Expand All @@ -350,8 +353,9 @@ class TestMPI : public CxxTest::TestSuite {
m_scheduler->loop();

TS_ASSERT_EQUALS(m_buffers.size(), 1);
for (auto i = m_buffers.begin(); i != m_buffers.end(); i++)
for (const auto& i : m_buffers) {
TS_ASSERT_EQUALS(i, 3);
}
} else {
int buffer = 3;
async.addBuffer(&buffer, sizeof(int), true);
Expand Down Expand Up @@ -637,8 +641,9 @@ class TestMPI : public CxxTest::TestSuite {
if (m_scheduler->isExecutor()) {
m_scheduler->loop();

for (auto i = m_buffers.begin(); i != m_buffers.end(); i++)
for (const auto& i : m_buffers) {
TS_ASSERT_EQUALS(i, 43);
}
} else {
async.addBuffer(nullptr, sizeof(int));

Expand Down

0 comments on commit ab1821f

Please sign in to comment.