Created
July 12, 2020 22:37
-
-
Save Coollision/6b85d2fed22fbfeab251f8c5c0620aa2 to your computer and use it in GitHub Desktop.
GOLANG Introduction into Testing: basic main_test file
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 TestLastIndex(t *testing.T) { | |
list := []int{1, 2, 1, 1} | |
if got := lastIndex(list, 2); got != 1 { | |
t.Errorf("LastIndex(%v, %v) = %v, want %v", list, 2, got, 1) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment