Files
libxmp/test-dev/test_loader_tdd.c
AliceLR d05ae78f4d Fix bugs in The Dark Demon format loader.
* Fixes a bug in the test function where sample sizes would not be
  doubled, resulting in format identification failure.
* Fixes a bug in the test function where -1 would be returned
  unconditionally, resulting in format identification failure.
* Fixes a bug in the depack function where sample sizes would not
  be doubled, resulting in garbage pattern data being loaded.
* Normalized header depacking to not require seeks in the output
  file (to match the other ProWizard loaders).
2021-01-09 16:28:44 -07:00

25 lines
494 B
C

#include "test.h"
TEST(test_loader_tdd)
{
xmp_context opaque;
struct xmp_module_info info;
FILE *f;
int ret;
f = fopen("data/format_tdd.data", "r");
opaque = xmp_create_context();
ret = xmp_load_module(opaque, "data/m/DarkDemon-SweetDreams.TDD");
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