Clean up code duplication in tests
- Dominant language
- C++
- Stars
- 72
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
While working on pr #299 I noticed that some test have quite a bit of duplicated code. E.g pattern like the following repeats quite a lot `"% fgrep "array_names" * | wc -l" -> 18`:
``` c++
vector array_names = { "data_array_a", "data_array_b", "data_array_c",
"data_array_d", "data_array_e" };
vector refs;
for (const auto &name : array_names) {
refs.push_back(block.createDataArray(name,
"reference",
DataType::Double,
{0}));
}
```
Contributor guide
Research direction
Start by reviewing the duplicated test pattern shown in the issue and use the `fgrep "array_names"` search to locate its occurrences. Inspect the related tests and PR #299 for context; done means consolidating repeated setup without changing test behavior, then running the affected test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100