Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 27 – Testes & Benchmarks – 1. Introdução
Play lesson

Aprenda Go 🇧🇷 - Cap. 27 – Testes & Benchmarks – 1. Introdução

5.0 (2)
47 learners

What you'll learn

This course includes

  • 21.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

- Testes devem: - ficar num arquivo cuja terminação seja _test.go - ficar na mesma package que o código a ser testado - ficar em funções com nome "func TestNome(*testing.T)" - Para rodar os testes: - go test - go test -v - Para falhas, utilizamos t.Error(), onde a maneira idiomática é algo do tipo "expected: x. got: y." - Código: https://github.com/ellenkorbes/aprendago/tree/master/c%C3%B3digo/27_testes-e-benchmarking/01_introducao

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere