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.
21 lines
522 B
21 lines
522 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("hit", "badfileDOESNOTEXIST.wav"));
|
|
REQUIRE_THROWS(sounds.play("hit"));
|
|
|
|
sounds.load("hit", "hit.wav");
|
|
sounds.play("hit");
|
|
sounds.playAt("hit", 1, 1, 1);
|
|
}
|
|
|