Added tests for examples
This commit is contained in:
parent
a0edc45e19
commit
1510f88165
4 changed files with 87 additions and 3 deletions
|
@ -63,3 +63,9 @@ func (r *Result) EachFunction(caller *Function, traversed map[*Function]bool, ca
|
|||
r.EachFunction(callee, traversed, call)
|
||||
}
|
||||
}
|
||||
|
||||
// Write write the final executable to disk.
|
||||
func (r *Result) Write(path string) error {
|
||||
code, data := r.Finalize()
|
||||
return Write(path, code, data)
|
||||
}
|
||||
|
|
|
@ -53,9 +53,7 @@ func Build(args []string) int {
|
|||
return 0
|
||||
}
|
||||
|
||||
path := b.Executable()
|
||||
code, data := result.Finalize()
|
||||
err = build.Write(path, code, data)
|
||||
err = result.Write(b.Executable())
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue