mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-10 06:31:37 +00:00
add gme test
This commit is contained in:
parent
cba46d8ad9
commit
331ecb01c6
1 changed files with 23 additions and 0 deletions
23
test/libgme.cpp
Normal file
23
test/libgme.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include <string.h>
|
||||
#include <gme/gme.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
AEDI_EXPECT(gme_type_list() != nullptr);
|
||||
|
||||
const gme_type_t type = gme_ay_type;
|
||||
const char* const type_system = "ZX Spectrum";
|
||||
const char* const type_ext = "AY";
|
||||
|
||||
Music_Emu* emu = gme_new_emu(type, 44100);
|
||||
AEDI_EXPECT(emu != nullptr);
|
||||
AEDI_EXPECT(gme_warning(emu) == nullptr);
|
||||
|
||||
AEDI_EXPECT(gme_type(emu) == type);
|
||||
AEDI_EXPECT(gme_type_multitrack(type) == 1);
|
||||
AEDI_EXPECT(strcmp(gme_type_system(type), type_system) == 0);
|
||||
AEDI_EXPECT(strcmp(gme_type_extension(type), type_ext) == 0);
|
||||
|
||||
gme_delete(emu);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue