35 lines
860 B
C++
35 lines
860 B
C++
|
#include <stdio.h>
|
||
|
#include "test.h"
|
||
|
|
||
|
#include "beatmap.h"
|
||
|
|
||
|
//tests
|
||
|
|
||
|
test_t tests[] = {NULL};
|
||
|
|
||
|
int main(int argc, char** argv) {
|
||
|
|
||
|
test_t* current = tests;
|
||
|
int failcount = 0;
|
||
|
int testcount = 0;
|
||
|
for(; *current; current++) {
|
||
|
testcount++;
|
||
|
printf("\033[1mRunning test number: %d ", testcount);
|
||
|
if((*current)()) {
|
||
|
printf("\033[1;92msucceeded\033[0;1m!\n");
|
||
|
} else {
|
||
|
printf("\033[1;91mfailed\033[0;1m\n");
|
||
|
failcount++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
printf("\033[1;93m%d\033[0;1m/%d failed\n", failcount, testcount);
|
||
|
|
||
|
//simple read test
|
||
|
std::unique_ptr<Beatsaber::BeatMap> bmap = Beatsaber::BeatMap::loadFromFolder("/media/satassd/steam/steamapps/common/Beat Saber/Beat Saber_Data/CustomLevels/1dd (Portal - Still Alive (Uppermost Remix) - kryptikos)");
|
||
|
if(!bmap) std::cout << "Could not load File" << std::endl;
|
||
|
else bmap->printDebug();
|
||
|
|
||
|
return failcount > 0;
|
||
|
}
|