You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frame: Extend test cases to increase code coverage.
Test a corpus of 585 public domain FLAC files with a duration of less than 1 minute from freesound.org.
Out of these files, the following increased code coverage and where thus added to the test suit.
* 19875 (sample rate 48 kHz)
* 44127 (8 bits-per-sample, sample rate 22254)
* 80574 (sample rate 22050)
* 191885 (block size 1, verbatim)
* 212768 (sample rate 88200)
* 220014 (utf-8 continuation byte)
* 243749 (sample rate 8000)
* 257344 (sample rate 32000)
* 256529 (sample rate 192000)
// TODO(u): Remove log message when the test cases have been extended.
316
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with %d bits-per-sample. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.BitsPerSample)
315
317
case0x4:
316
318
// 100: 16 bits-per-sample.
317
319
frame.BitsPerSample=16
318
320
case0x5:
319
321
// 101: 20 bits-per-sample.
320
322
frame.BitsPerSample=20
323
+
// TODO(u): Remove log message when the test cases have been extended.
324
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with %d bits-per-sample. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.BitsPerSample)
// TODO(u): Remove log message when the test cases have been extended.
370
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with block size %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.BlockSize)
// TODO(u): Remove log message when the test cases have been extended.
422
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with sample rate %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.SampleRate)
// TODO(u): Remove log message when the test cases have been extended.
433
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with sample rate %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.SampleRate)
424
434
case0x6:
425
435
// 0110: 22.05 kHz.
426
436
frame.SampleRate=22050
427
437
case0x7:
428
438
// 0111: 24 kHz.
429
439
frame.SampleRate=24000
440
+
// TODO(u): Remove log message when the test cases have been extended.
441
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with sample rate %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.SampleRate)
// TODO(u): Remove log message when the test cases have been extended.
462
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with sample rate %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.SampleRate)
449
463
case0xD:
450
464
// 1101: get 16 bit sample rate (in Hz) from the end of the header.
// TODO(u): Remove log message when the test cases have been extended.
478
+
log.Printf("frame.Frame.parseHeader: The flac library test cases do not yet include any audio files with sample rate %d. If possible please consider contributing this audio sample to improve the reliability of the test cases.", frame.SampleRate)
463
479
default:
464
480
// 1111: invalid.
465
481
returnerrors.New("frame.Frame.parseHeader: invalid sample rate bit pattern (1111)")
log.Printf("frame.Subframe.decodeRicePart: not yet implemented; Rice parameter escape code. Please send this file to us, we would like to verify this part of the code.")
418
+
// TODO(u): Remove log message when the test cases have been extended.
419
+
log.Print("frame.Subframe.decodeRicePart: The flac library test cases do not yet include any audio files with Rice parameter escape codes. If possible please consider contributing this audio sample to improve the reliability of the test cases.")
// TODO(u): Remove log message when the test cases have been extended.
97
+
log.Printf("frame.decodeUTF8Int: The flac library test cases do not yet include any audio files with %d UTF-8 continuation bytes. If possible please consider contributing this audio sample to improve the reliability of the test cases.", l)
95
98
casec0<t6:
96
99
// if c0 == 111110xx
97
100
// total: 26 bits (2 + 6 + 6 + 6 + 6)
98
101
l=4
99
102
n=uint64(c0&mask5)
103
+
// TODO(u): Remove log message when the test cases have been extended.
104
+
log.Printf("frame.decodeUTF8Int: The flac library test cases do not yet include any audio files with %d UTF-8 continuation bytes. If possible please consider contributing this audio sample to improve the reliability of the test cases.", l)
100
105
casec0<t7:
101
106
// if c0 == 1111110x
102
107
// total: 31 bits (1 + 6 + 6 + 6 + 6 + 6)
103
108
l=5
104
109
n=uint64(c0&mask6)
110
+
// TODO(u): Remove log message when the test cases have been extended.
111
+
log.Printf("frame.decodeUTF8Int: The flac library test cases do not yet include any audio files with %d UTF-8 continuation bytes. If possible please consider contributing this audio sample to improve the reliability of the test cases.", l)
105
112
casec0<t8:
106
113
// if c0 == 11111110
107
114
// total: 36 bits (0 + 6 + 6 + 6 + 6 + 6 + 6)
108
115
l=6
109
116
n=0
117
+
// TODO(u): Remove log message when the test cases have been extended.
118
+
log.Printf("frame.decodeUTF8Int: The flac library test cases do not yet include any audio files with %d UTF-8 continuation bytes. If possible please consider contributing this audio sample to improve the reliability of the test cases.", l)
0 commit comments