Added tests for examples
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user