mirror of
https://github.com/OldUnreal/libxmp.git
synced 2026-04-02 21:37:43 -07:00
The regression test suite is important for development but for end user tests a simpler check is sufficient. Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
23 lines
519 B
C
23 lines
519 B
C
#include "test.h"
|
|
|
|
TEST(test_player_scan)
|
|
{
|
|
xmp_context opaque;
|
|
struct xmp_frame_info info;
|
|
int ret;
|
|
|
|
opaque = xmp_create_context();
|
|
fail_unless(opaque != NULL, "can't create context");
|
|
|
|
ret = xmp_load_module(opaque, "data/ode2ptk.mod");
|
|
fail_unless(ret == 0, "can't load module");
|
|
|
|
xmp_start_player(opaque, 44100, 0);
|
|
xmp_get_frame_info(opaque, &info);
|
|
fail_unless(info.total_time == 85472, "incorrect total time");
|
|
xmp_end_player(opaque);
|
|
xmp_release_module(opaque);
|
|
xmp_free_context(opaque);
|
|
}
|
|
END_TEST
|