v2 / vlib / encoding / vorbis / vorbis_test.v
15 lines · 13 sloc · 405 bytes · bf29124d3b7d766aca92767dd63a4eb7b4a3ba81
Raw
1// vtest build: !sanitize-address-gcc && !sanitize-address-clang
2import encoding.vorbis
3import os
4
5fn test_compilation() {
6 assert vorbis.wrapper_version() == '1.22'
7}
8
9fn test_decode_file() {
10 x := vorbis.decode_file(os.join_path(@VEXEROOT, 'examples/sokol/sounds/pickup.ogg'))!
11 assert x.path.ends_with('pickup.ogg')
12 assert x.channels == 1
13 assert x.sample_rate == 44100
14 assert x.sample_len == 5478
15}
16