Skip to content

Commit

Permalink
test generator: test from a separate pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Apr 28, 2024
1 parent 4113889 commit 9778499
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,14 @@ def q(s): return s.encode('unicode-escape').decode()

part1 = r"""// Code generated by "./test.py generate"; DO NOT EDIT.
package bcl
package bcl_test
import (
"bytes"
"strings"
"testing"
"github.com/wkhere/bcl"
)
func TestInterpretFromPy(t *testing.T) {
Expand All @@ -453,10 +455,10 @@ def q(s): return s.encode('unicode-escape').decode()
out := new(bytes.Buffer)
log := new(bytes.Buffer)
_, err := Interpret(
_, err := bcl.Interpret(
[]byte(tc.input),
OptDisasm(tc.disasm),
OptOutput(out), OptLogger(log),
bcl.OptDisasm(tc.disasm),
bcl.OptOutput(out), bcl.OptLogger(log),
)
switch {
Expand Down
10 changes: 6 additions & 4 deletions testapi_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9778499

Please sign in to comment.