MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / main

Function main

tests/dss_renderer_test.cpp:30–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28} // namespace
29
30int main()
31{
32 DssRenderer renderer;
33 QVector<float> bins(DssRenderer::kCols, -100.0f);
34 bins[DssRenderer::kCols / 2] = -40.0f;
35 renderer.pushRow(bins);
36
37 const int beforeCount = renderer.rowCount();
38 const quint64 beforeGeneration = renderer.rowGeneration();
39 renderer.reprojectFrequencyFrame(
40 14.0, 1.0,
41 14.25, 1.0,
42 -200.0f);
43
44 if (renderer.rowCount() != beforeCount) {
45 return fail("frequency reprojection must preserve DSS history rows");
46 }
47 if (renderer.rowGeneration() <= beforeGeneration) {
48 return fail("frequency reprojection must mark rows changed for GPU upload");
49 }
50
51 const int expectedBin = DssRenderer::kCols / 4;
52 const int actualBin = strongestBin(renderer);
53 if (std::abs(actualBin - expectedBin) > 3) {
54 return fail("frequency reprojection should shift history into the new viewport");
55 }
56
57 return 0;
58}

Callers

nothing calls this directly

Calls 6

strongestBinFunction · 0.85
pushRowMethod · 0.80
rowGenerationMethod · 0.80
failFunction · 0.70
rowCountMethod · 0.45

Tested by

no test coverage detected