Skip to content

Commit be53113

Browse files
committed
Adjust testing array code
1 parent 9a7a9af commit be53113

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

wpimath/src/test/native/cpp/TimeTest.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ void ProcessDurations(const wpi::array<units::nanosecond_t, N>& durations,
9696
wpi::print("{}Last 10: {}\n", prefix, buffer);
9797
std::fflush(stdout);
9898

99-
wpi::print("{}\n", durations[0]);
99+
wpi::array<units::nanosecond_t, 10> array_a(wpi::empty_array);
100+
for (size_t i = 0; i < 10; ++i) {
101+
array_a[i] = 0_ns;
102+
}
100103

101-
[[ maybe_unused ]] std::array<units::nanosecond_t, N> sorted{durations};
104+
[[ maybe_unused ]] std::array<units::nanosecond_t, 10> array_b{array_a};
102105

103-
wpi::print("{}\n", durations[0]);
104-
// wpi::print("{}\n", sorted[0]);
106+
wpi::print("{}\n", array_b[0]);
105107
}
106108

107109
template <size_t N>

0 commit comments

Comments
 (0)