Skip to content

Commit 167f6b1

Browse files
committed
refactor codebase: standardize comment formatting across modules for improved readability
1 parent d7557cc commit 167f6b1

File tree

6 files changed

+22
-24
lines changed

6 files changed

+22
-24
lines changed

modules/performance/tests/perf_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ TEST(PerfTest, PipelineRunAndTaskRun_WithValidTask_ExecutesSuccessfully) {
356356
TEST(PerfTest, PrintPerfStatistic_WithNoneType_ThrowsException) {
357357
{
358358
auto task_ptr = std::make_shared<DummyTask>();
359-
task_ptr->ExpectIncompleteLifecycle(); // Task not executed in a performance test
359+
task_ptr->ExpectIncompleteLifecycle(); // Task not executed in a performance test
360360
Perf<int, int> perf(task_ptr);
361361
EXPECT_THROW(perf.PrintPerfStatistic("test"), std::runtime_error);
362362
}
@@ -616,7 +616,7 @@ TEST(TaskTest, Destructor_WithInvalidPipelineOrderAndPartialExecution_Terminates
616616
bool RunImpl() override { return true; }
617617
bool PostProcessingImpl() override { return true; }
618618
} task;
619-
task.ExpectIncompleteLifecycle(); // Task has incomplete pipeline execution
619+
task.ExpectIncompleteLifecycle(); // Task has incomplete pipeline execution
620620
task.Validation();
621621
}
622622
}

modules/runners/src/runners.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ int Init(int argc, char** argv) {
8585
listeners.Append(new UnreadMessagesDetector());
8686

8787
status = RUN_ALL_TESTS();
88-
} // TBB control object destroyed here
89-
88+
} // TBB control object destroyed here
9089

9190
const int finalize_res = MPI_Finalize();
9291
if (finalize_res != MPI_SUCCESS) {
@@ -105,7 +104,7 @@ int SimpleInit(int argc, char** argv) {
105104

106105
testing::InitGoogleTest(&argc, argv);
107106
status = RUN_ALL_TESTS();
108-
} // TBB control object destroyed here
107+
} // TBB control object destroyed here
109108

110109
return status;
111110
}

modules/task/include/task.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ class Task {
201201
virtual ~Task() {
202202
if (stage_ != PipelineStage::kDone && stage_ != PipelineStage::kException && !expect_incomplete_) {
203203
// Immediate failure - better than global state pollution
204-
std::cerr << "[TASK ERROR] Task destroyed without completing pipeline. Stage: "
205-
<< static_cast<int>(stage_) << std::endl;
204+
std::cerr << "[TASK ERROR] Task destroyed without completing pipeline. Stage: " << static_cast<int>(stage_)
205+
<< std::endl;
206206
std::terminate();
207207
}
208208
#if _OPENMP >= 201811

modules/task/tests/task_additional.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ TEST_F(TaskAdditionalTest, TaskGetter_WithBasicTask_CreatesTaskSuccessfully) {
3838

3939
// Test TaskGetter function
4040
auto getter_result = ppc::task::TaskGetter<GetterTestTask>(42);
41-
getter_result->ExpectIncompleteLifecycle(); // Task is only created for testing, not executed
41+
getter_result->ExpectIncompleteLifecycle(); // Task is only created for testing, not executed
4242

4343
EXPECT_NE(getter_result, nullptr);
4444
EXPECT_EQ(getter_result->GetValue(), 42);
@@ -79,9 +79,9 @@ TEST_F(TaskAdditionalTest, TaskGetter_WithDifferentTaskTypes_CreatesTasksSuccess
7979

8080
auto getter1 = ppc::task::TaskGetter<TaskType1>(std::string("test"));
8181
auto getter2 = ppc::task::TaskGetter<TaskType2>(3.14);
82-
83-
getter1->ExpectIncompleteLifecycle(); // Tasks are only created for testing
84-
getter2->ExpectIncompleteLifecycle(); // Tasks are only created for testing
82+
83+
getter1->ExpectIncompleteLifecycle(); // Tasks are only created for testing
84+
getter2->ExpectIncompleteLifecycle(); // Tasks are only created for testing
8585

8686
EXPECT_NE(getter1, nullptr);
8787
EXPECT_NE(getter2, nullptr);

modules/task/tests/task_tests.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ TEST(TaskTest, SlowTask_WithInt32Vector_ThrowsOnTimeout) {
8383
{
8484
std::vector<int32_t> in(20, 1);
8585
ppc::test::FakeSlowTask<std::vector<int32_t>, int32_t> test_task(in);
86-
test_task.ExpectIncompleteLifecycle(); // Task may not complete due to timeout
86+
test_task.ExpectIncompleteLifecycle(); // Task may not complete due to timeout
8787
ASSERT_EQ(test_task.Validation(), true);
8888
test_task.PreProcessing();
8989
test_task.Run();
@@ -95,7 +95,7 @@ TEST(TaskTest, TestTask_WithEmptyInput_ValidationFails) {
9595
{
9696
std::vector<int32_t> in;
9797
ppc::test::TestTask<std::vector<int32_t>, int32_t> test_task(in);
98-
test_task.ExpectIncompleteLifecycle(); // Task fails validation so won't complete
98+
test_task.ExpectIncompleteLifecycle(); // Task fails validation so won't complete
9999
ASSERT_EQ(test_task.Validation(), false);
100100
}
101101
}
@@ -124,7 +124,7 @@ TEST(TaskTest, TestTask_WithWrongExecutionOrder_ThrowsRuntimeError) {
124124
{
125125
std::vector<float> in(20, 1);
126126
ppc::test::TestTask<std::vector<float>, float> test_task(in);
127-
test_task.ExpectIncompleteLifecycle(); // Task has wrong execution order
127+
test_task.ExpectIncompleteLifecycle(); // Task has wrong execution order
128128
ASSERT_EQ(test_task.Validation(), true);
129129
test_task.PreProcessing();
130130
EXPECT_THROW(test_task.PostProcessing(), std::runtime_error);
@@ -135,7 +135,7 @@ TEST(TaskTest, TestTask_WithPrematurePostProcessingNoSteps_ThrowsRuntimeError) {
135135
{
136136
std::vector<float> in(20, 1);
137137
ppc::test::TestTask<std::vector<float>, float> test_task(in);
138-
test_task.ExpectIncompleteLifecycle(); // Task throws exception so won't complete
138+
test_task.ExpectIncompleteLifecycle(); // Task throws exception so won't complete
139139
EXPECT_THROW(test_task.PostProcessing(), std::runtime_error);
140140
}
141141
}
@@ -144,7 +144,7 @@ TEST(TaskTest, TestTask_WithPrematurePostProcessingAfterPreProcessing_ThrowsRunt
144144
{
145145
std::vector<float> in(20, 1);
146146
ppc::test::TestTask<std::vector<float>, float> test_task(in);
147-
test_task.ExpectIncompleteLifecycle(); // Task throws exceptions so won't complete
147+
test_task.ExpectIncompleteLifecycle(); // Task throws exceptions so won't complete
148148
EXPECT_THROW(test_task.PreProcessing(), std::runtime_error);
149149
EXPECT_THROW(test_task.PostProcessing(), std::runtime_error);
150150
}
@@ -228,7 +228,7 @@ TEST(TaskTest, TaskDestructor_WithIncompleteStage_SetsDestructorFailureFlag) {
228228
bool RunImpl() override { return true; }
229229
bool PostProcessingImpl() override { return true; }
230230
} task(in);
231-
task.ExpectIncompleteLifecycle(); // Mark this task as expected to be incomplete
231+
task.ExpectIncompleteLifecycle(); // Mark this task as expected to be incomplete
232232
task.Validation();
233233
}
234234
// No need to check global flag - task handles its own validation
@@ -244,7 +244,7 @@ TEST(TaskTest, TaskDestructor_WithEmptyTask_SetsDestructorFailureFlag) {
244244
bool RunImpl() override { return true; }
245245
bool PostProcessingImpl() override { return true; }
246246
} task(in);
247-
task.ExpectIncompleteLifecycle(); // Mark this task as expected to be incomplete
247+
task.ExpectIncompleteLifecycle(); // Mark this task as expected to be incomplete
248248
}
249249
// No need to check global flag - task handles its own validation
250250
}
@@ -264,7 +264,7 @@ TEST(TaskTest, InternalTimeTest_WithTimeoutExceeded_ThrowsRuntimeError) {
264264
{
265265
std::vector<int32_t> in(20, 1);
266266
SlowTask task(in);
267-
task.ExpectIncompleteLifecycle(); // Task throws timeout exception
267+
task.ExpectIncompleteLifecycle(); // Task throws timeout exception
268268
task.GetStateOfTesting() = StateOfTesting::kFunc;
269269
task.Validation();
270270
EXPECT_NO_THROW(task.PreProcessing());
@@ -285,7 +285,7 @@ class DummyTask : public Task<int, int> {
285285
TEST(TaskTest, Validation_WhenCalledTwice_ThrowsRuntimeError) {
286286
{
287287
auto task = std::make_shared<DummyTask>();
288-
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
288+
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
289289
task->Validation();
290290
EXPECT_THROW(task->Validation(), std::runtime_error);
291291
}
@@ -294,23 +294,23 @@ TEST(TaskTest, Validation_WhenCalledTwice_ThrowsRuntimeError) {
294294
TEST(TaskTest, PreProcessing_WhenCalledBeforeValidation_ThrowsRuntimeError) {
295295
{
296296
auto task = std::make_shared<DummyTask>();
297-
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
297+
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
298298
EXPECT_THROW(task->PreProcessing(), std::runtime_error);
299299
}
300300
}
301301

302302
TEST(TaskTest, Run_WhenCalledBeforePreProcessing_ThrowsRuntimeError) {
303303
{
304304
auto task = std::make_shared<DummyTask>();
305-
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
305+
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
306306
EXPECT_THROW(task->Run(), std::runtime_error);
307307
}
308308
}
309309

310310
TEST(TaskTest, PostProcessing_WhenCalledBeforeRun_ThrowsRuntimeError) {
311311
{
312312
auto task = std::make_shared<DummyTask>();
313-
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
313+
task->ExpectIncompleteLifecycle(); // Task throws exception so won't complete
314314
task->Validation();
315315
task->PreProcessing();
316316
EXPECT_THROW(task->PostProcessing(), std::runtime_error);

modules/util/include/util.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ using NlohmannJsonTypeError = nlohmann::json::type_error;
2929

3030
namespace ppc::util {
3131

32-
3332
enum GTestParamIndex : uint8_t { kTaskGetter, kNameTest, kTestParams };
3433

3534
std::string GetAbsoluteTaskPath(const std::string& id_path, const std::string& relative_path);

0 commit comments

Comments
 (0)