-
-
Save leozz37/9f453859938828ac6f496c78f4442b7d to your computer and use it in GitHub Desktop.
Simple Golang Hello World test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "testing" | |
func TestHelloWorld(t *testing.T) { | |
expected := "Hello from Golang!" | |
result := HelloWorld() | |
if expected != result { | |
t.Errorf("HelloWorld was incorrect, got: %s, want: %s.", result, expected) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment