Smarty Blog - February 2015

Testing in Go by example: Part 2Arrow Icon
Tests that aren't easy to execute will be ignored.
February 27, 2015 - Here's part 2 of our "Testing in Go" series. If you're new, feel free to catch up before reading on. ------------------------ Basics You've already learned how to execute tests in Go for a single package. $ go test There's a bit more to it, though. You can run any package from anywhere if you provide the import path. For example, this command runs the actual tests for the "testing" package from the standard library: $ go test -v testing If you've already run go get github. com/bradfitz/http2 you can execute those tests from anywhere with this: $ go test -v github.
Testing in Go by example: Part 1Arrow Icon
How to use the built-in 'testing' package.
February 27, 2015 - Here's part 1 of our "Testing in Go" series. Introduction Thinking about trying Go? You won't regret it! It's great that testing is baked into the "testing" package from the standard library and the corresponding go test command (which has all sorts of useful and interesting flags). We'd like to show you how easy it is to get started using the built-in testing tools and introduce you to some tools we've created. This is the first installment of a series designed to do just that. All you have to do is create a file named like *test.
View Blog Tags

The leader in location data intelligence

Ready to get started?