Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fidlib Unit-Tests #11502

Merged
merged 4 commits into from
Apr 24, 2023
Merged

Fidlib Unit-Tests #11502

merged 4 commits into from
Apr 24, 2023

Conversation

daschuer
Copy link
Member

This adds two tests, that aims to detect bugs like #11483

This is one step closer to the source, compared to #11489 and can be a low impact alternative. We may consider to close the outer test PR or keep/tweak it to be an extension to this one.

@daschuer
Copy link
Member Author

@uklotzde @hapst3r can you check if these test are failing with GCC 13?

@Swiftb0y
Copy link
Member

Swiftb0y commented Apr 21, 2023

GCC 13.0.1

Note: Google Test filter = EngineFilterBiquadTest.*
[==========] Running 4 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 4 tests from EngineFilterBiquadTest
[ RUN      ] EngineFilterBiquadTest.fidlibInputRespectsLocale
[       OK ] EngineFilterBiquadTest.fidlibInputRespectsLocale (0 ms)
[ RUN      ] EngineFilterBiquadTest.fidspecLengthIsLongEnough
[       OK ] EngineFilterBiquadTest.fidspecLengthIsLongEnough (0 ms)
[ RUN      ] EngineFilterBiquadTest.analysisPkBq
[       OK ] EngineFilterBiquadTest.analysisPkBq (0 ms)
[ RUN      ] EngineFilterBiquadTest.analysisLpBe4
/home/swiftb0y/Sourcerepositories/mixxx/src/test/enginefilterbiquadtest.cpp:41: Failure
Expected equality of these values:
  delay
    Which is: 22
  24
[  FAILED  ] EngineFilterBiquadTest.analysisLpBe4 (0 ms)
[----------] 4 tests from EngineFilterBiquadTest (0 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test suite ran. (0 ms total)
[  PASSED  ] 3 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] EngineFilterBiquadTest.analysisLpBe4

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. Test is failing as expected.

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise.

Comment on lines 30 to 33
double resp0, phase0;
resp0 = fid_response_pha(filt, 1000 / 44100, &phase0);
EXPECT_DOUBLE_EQ(resp0, 1);
EXPECT_DOUBLE_EQ(phase0, 0);
Copy link
Member

@Swiftb0y Swiftb0y Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phase0 could be uninitialized on failure and might be 0 implicitly. Can we initialize to some placeholder value? same applies to analysisLpBe4.

@daschuer
Copy link
Member Author

Done.

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I can't judge how robust these tests are actually are.

@Swiftb0y Swiftb0y merged commit 0c323df into mixxxdj:2.3 Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants