使用Go Test测试单个文件和单个方法

前置条件:函数 一、文件名须以"_test.go"结尾测试 二、方法名须以"Test"打头,而且形参为 (t *testing.T)code 举例:/hello_test.goclass package main import ( "testing" "fmt" ) func TestHello(t *testing.T) { fmt.Println("TestHello") } fu
相关文章
相关标签/搜索