Skip to content

Commit

Permalink
fix: test for arm64 architecture properly in MP3DecoderTests
Browse files Browse the repository at this point in the history
on arm64/aarch64 libmpg123 generates bad data leading to the test
MP3DecoderTests.test_DecodeMP3As2PiecesMPG123_SameAs1Piece failing. this
test was excluded by testing for the TARGET_CPU_ARM64 macro. but this is
an Xcode macro defined in TargetConditionals.h. thus the test would not
be excluded when compiling on a device such as the Raspberry Pi 4 or
5. the portable way to test for arm64 architecture with clang is to
   check for __aarch64__: https://stackoverflow.com/a/41666292
  • Loading branch information
rsekman committed Nov 10, 2024
1 parent d63c1ef commit d3cc85e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/MP3DecoderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static void runMp3TwoPieceTestWithBackend(int backend) {
EXPECT_TRUE(cmp==0);
}

#if !TARGET_CPU_ARM64
#if !__aarch64__
// FIXME: Looks like MPG123 generates bad data in that test. Needs proper debugging on arm64 host.
TEST_F(MP3DecoderTests, test_DecodeMP3As2PiecesMPG123_SameAs1Piece) {
runMp3TwoPieceTestWithBackend(0); // mpg123
Expand Down

0 comments on commit d3cc85e

Please sign in to comment.