mirror of
https://github.com/SFML/SFML.git
synced 2025-02-13 11:58:01 +08:00
Test opening sf::Music
with non-ASCII filenames
This commit is contained in:
parent
645796f7fb
commit
594eb408cb
@ -132,8 +132,22 @@ TEST_CASE("[Audio] sf::Music", runAudioDeviceTests())
|
|||||||
}
|
}
|
||||||
|
|
||||||
SECTION("Valid file")
|
SECTION("Valid file")
|
||||||
|
{
|
||||||
|
SECTION("ASCII filename")
|
||||||
{
|
{
|
||||||
REQUIRE(music.openFromFile("Audio/ding.mp3"));
|
REQUIRE(music.openFromFile("Audio/ding.mp3"));
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Polish filename")
|
||||||
|
{
|
||||||
|
REQUIRE(music.openFromFile(U"Audio/ding-\u0144.mp3"));
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Emoji filename")
|
||||||
|
{
|
||||||
|
REQUIRE(music.openFromFile(U"Audio/ding-\U0001F40C.mp3"));
|
||||||
|
}
|
||||||
|
|
||||||
CHECK(music.getDuration() == sf::microseconds(1990884));
|
CHECK(music.getDuration() == sf::microseconds(1990884));
|
||||||
const auto [offset, length] = music.getLoopPoints();
|
const auto [offset, length] = music.getLoopPoints();
|
||||||
CHECK(offset == sf::Time::Zero);
|
CHECK(offset == sf::Time::Zero);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user