Skip to content

vmashmooli/GoLang_Unit_Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoLang_Unit_Test

Simple unit test in GoLang

Description

Create a simple function to add two arguments, and then create a simple unit test to test the function

Getting Started

Step 1 — Creating a sample golang package on main.go

Step 2 — Creating a unit test on main_test.go

Step 3 — Run the test

Dependencies

  • ubuntu 16 or higher
  • Golang 1.11 or higher
  • import FMT and Testing packages

Executing program

  • go mod init
  • go run main.go
  • go test
  • go test -bench=.

Authors

vahid mashmooli [email protected]

Version History

  • 0.001

About

Simple unit test in GoLang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages