feat: Delays and samples are now working through the bridge.

One should call bridge.Init() once during the initialization of the program to load the static sample table. On linux, bridge.Init() does nothing.
This commit is contained in:
Veikko Sariola
2020-11-08 16:03:10 +02:00
parent e65b08d2b3
commit bcbb5aaf19
12 changed files with 155 additions and 50 deletions

View File

@ -18,6 +18,7 @@ import (
)
func TestAllAsmFiles(t *testing.T) {
bridge.Init()
_, myname, _, _ := runtime.Caller(0)
files, err := filepath.Glob(path.Join(path.Dir(myname), "..", "tests", "*.asm"))
if err != nil {
@ -27,9 +28,6 @@ func TestAllAsmFiles(t *testing.T) {
basename := filepath.Base(filename)
testname := strings.TrimSuffix(basename, path.Ext(basename))
t.Run(testname, func(t *testing.T) {
if strings.Contains(testname, "delay") || strings.Contains(testname, "sample") {
return // delays and samples are not implemented yet in the bridge, so skip them for now
}
file, err := os.Open(filename)
if err != nil {
t.Fatalf("cannot read the .asm file: %v", filename)