Files
libxmp/test-dev/test_loader_ptm.c
Claudio Matsuoka d2fdec1c86 [test] Add test for PTM loader
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2013-10-01 16:22:09 -03:00

25 lines
481 B
C

#include "test.h"
TEST(test_loader_ptm)
{
xmp_context opaque;
struct xmp_module_info info;
FILE *f;
int ret;
f = fopen("data/format_ptm.data", "r");
opaque = xmp_create_context();
ret = xmp_load_module(opaque, "data/m/rew_vibr.ptm");
fail_unless(ret == 0, "module load");
xmp_get_module_info(opaque, &info);
ret = compare_module(info.mod, f);
fail_unless(ret == 0, "format not correctly loaded");
xmp_release_module(opaque);
xmp_free_context(opaque);
}
END_TEST