The next little game in the series where I make a fancy rogue game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
roguish/tests/sound.cpp

22 lines
555 B

#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "sound.hpp"
#include "dinkyecs.hpp"
using DinkyECS::Entity;
using namespace fmt;
TEST_CASE("confirm basic functionality", "[sounds]") {
REQUIRE_THROWS([&](){SoundManager sounds("./BADassets");}());
SoundManager sounds("./assets");
REQUIRE_THROWS(sounds.load("bad", "badfileDOESNOTEXIST.wav"));
REQUIRE_THROWS(sounds.play("bad"));
sounds.load("combat_miss", "combat_miss.flac");
sounds.play("combat_miss");
sounds.playAt("combat_miss", 1, 1, 1);
}