libBeatsaber/tests/testenums.cpp

38 lines
981 B
C++

#include "test.h"
#include "difficulties.h"
#include "beatmapcharacteristic.h"
int difficulties_test() {
using d = Beatsaber::Difficulty::Difficulty;
using namespace Beatsaber::Difficulty;
CMPASSERT(d::EASY, getByString("Easy"));
CMPASSERT(d::NORMAL, getByString("Normal"));
CMPASSERT(d::NONE, getByString(""));
CMPASSERT(d::NONE, getByString("abc"));
CMPASSERT(d::HARD, getByString("Hard"));
CMPASSERT(d::EXPERTP, getByString("ExpertPlus"));
return TESTGOOD;
}
int characteristics_test() {
using c = Beatsaber::BeatmapCharacteristic::BeatmapCharacteristic;
using namespace Beatsaber::BeatmapCharacteristic;
CMPASSERT(c::NONE, getByString(""));
CMPASSERT(c::NONE, getByString("abc"));
CMPASSERT(c::STANDARD, getByString("Standard"));
CMPASSERT(c::ONESABER, getByString("OneSaber"));
CMPASSERT(c::NOARROWS, getByString("NoArrows"));
CMPASSERT(c::DEGREE90, getByString("90Degree"));
CMPASSERT(c::DEGREE360, getByString("360Degree"));
return TESTGOOD;
}