Skip to content

Instantly share code, notes, and snippets.

@kare
Created November 22, 2016 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kare/4713a79fe518647834f664814ba97acc to your computer and use it in GitHub Desktop.
Save kare/4713a79fe518647834f664814ba97acc to your computer and use it in GitHub Desktop.
Go unit test setup and teardown test-run.txt
=== RUN TestAddition
=== RUN TestAddition/add
=== RUN TestAddition/minus
=== RUN TestAddition/zero
--- PASS: TestAddition (0.00s)
math_test.go:6: setup test case
--- PASS: TestAddition/add (0.00s)
math_test.go:13: setup sub test
math_test.go:15: teardown sub test
--- PASS: TestAddition/minus (0.00s)
math_test.go:13: setup sub test
math_test.go:15: teardown sub test
--- PASS: TestAddition/zero (0.00s)
math_test.go:13: setup sub test
math_test.go:15: teardown sub test
math_test.go:8: teardown test case
PASS
ok github.com/kare/go-unit-test-setup-teardown 0.010s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment