Skip to content

Commit

Permalink
Add empty main function
Browse files Browse the repository at this point in the history
Add empty main function and tests to pass build requirements
  • Loading branch information
patrickmarabeas committed Aug 25, 2019
1 parent 4c1d631 commit 4b0de14
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 06_puppy/patrickmarabeas/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {

}
25 changes: 25 additions & 0 deletions 06_puppy/patrickmarabeas/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package main

import (
"bytes"
"io"
"os"
"testing"
)

var out io.Writer = os.Stdout

func TestMainOutput(t *testing.T) {
var buf bytes.Buffer
out = &buf

main()

expected := ""

got := buf.String()

if expected != got {
t.Errorf("\nExpected: %s\nGot: %s", expected, got)
}
}

0 comments on commit 4b0de14

Please sign in to comment.