Go binary/server for helping run/build sessions for the Maze Rats TTRPG
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
440 B

package helpers
import (
"testing"
"regexp"
)
func ExactItem(actualResult string, expectedResult string, t *testing.T) {
if actualResult != expectedResult {
t.Errorf("Expected '%v' to equal '%v'", actualResult, expectedResult)
}
}
func RegexItem(actual string, regex string, t *testing.T) {
re := regexp.MustCompile(regex)
if re.MatchString(actual) != true {
t.Errorf("Expected '%v' to match '%v'", actual, re)
}
}