mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
parent
1acf110078
commit
689d230cb7
19
audio/vorbis/generate.go
Normal file
19
audio/vorbis/generate.go
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2019 The Ebiten Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:generate file2byteslice -package=vorbis_test -input=./test_mono.ogg -output=./testmonoogg_test.go -var=test_mono_ogg
|
||||
//go:generate file2byteslice -package=vorbis_test -input=./test_tooshort.ogg -output=./testtooshortogg_test.go -var=test_tooshort_ogg
|
||||
//go:generate gofmt -s -w .
|
||||
|
||||
package vorbis
|
6
audio/vorbis/testmonoogg_test.go
Normal file
6
audio/vorbis/testmonoogg_test.go
Normal file
File diff suppressed because one or more lines are too long
6
audio/vorbis/testtooshortogg_test.go
Normal file
6
audio/vorbis/testtooshortogg_test.go
Normal file
File diff suppressed because one or more lines are too long
@ -15,7 +15,6 @@
|
||||
package vorbis_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/jfreymuth/oggvorbis"
|
||||
@ -35,10 +34,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestMono(t *testing.T) {
|
||||
bs, err := ioutil.ReadFile("test_mono.ogg")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
bs := test_mono_ogg
|
||||
|
||||
s, err := Decode(audioContext, audio.BytesReadSeekCloser(bs))
|
||||
if err != nil {
|
||||
@ -64,10 +60,7 @@ func TestMono(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTooShort(t *testing.T) {
|
||||
bs, err := ioutil.ReadFile("test_tooshort.ogg")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
bs := test_tooshort_ogg
|
||||
|
||||
s, err := Decode(audioContext, audio.BytesReadSeekCloser(bs))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user