Skip to content

Commit

Permalink
Fix qa_Picoscope4000a
Browse files Browse the repository at this point in the history
Be more lenient about the max. allowed samples, fix tag names
to test for (regression from e8c3a49).
  • Loading branch information
frankosterfeld committed Mar 26, 2024
1 parent 53c2640 commit 0853b04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blocklib/picoscope/test/qa_Picoscope4000a.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ testStreamingBasics() {
fmt::println("Total: {}", sink.samples_seen);

expect(ge(sink.samples_seen, 80000UZ));
expect(le(sink.samples_seen, 160000UZ));
expect(le(sink.samples_seen, 170000UZ));
expect(eq(tagMonitor.tags.size(), 1UZ));
const auto &tag = tagMonitor.tags[0];
expect(eq(tag.index, int64_t{ 0 }));
expect(eq(std::get<float>(tag.at(std::string(tag::SAMPLE_RATE.key()))), static_cast<float>(kSampleRate)));
expect(eq(std::get<std::string>(tag.at(std::string(tag::SIGNAL_NAME.key()))), "Test signal"s));
expect(eq(std::get<std::string>(tag.at(std::string(tag::SIGNAL_UNIT.key()))), "Test unit"s));
expect(eq(std::get<float>(tag.at(std::string(tag::SIGNAL_MIN.key()))), 0.f));
expect(eq(std::get<float>(tag.at(std::string(tag::SIGNAL_MAX.key()))), 5.f));
expect(eq(std::get<float>(tag.at(std::string(tag::SAMPLE_RATE.shortKey()))), static_cast<float>(kSampleRate)));
expect(eq(std::get<std::string>(tag.at(std::string(tag::SIGNAL_NAME.shortKey()))), "Test signal"s));
expect(eq(std::get<std::string>(tag.at(std::string(tag::SIGNAL_UNIT.shortKey()))), "Test unit"s));
expect(eq(std::get<float>(tag.at(std::string(tag::SIGNAL_MIN.shortKey()))), 0.f));
expect(eq(std::get<float>(tag.at(std::string(tag::SIGNAL_MAX.shortKey()))), 5.f));
}

const boost::ut::suite Picoscope4000aTests = [] {
Expand Down

0 comments on commit 0853b04

Please sign in to comment.