Create main_test.go
This commit is contained in:
parent
870cf1408c
commit
2dced817a4
1 changed files with 11 additions and 0 deletions
11
examples/golang-tests/main_test.go
Normal file
11
examples/golang-tests/main_test.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCalculate(t *testing.T) {
|
||||
if Calculate(2) != 4 {
|
||||
t.Error("Expected 2 + 2 to equal 4")
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue