MCPcopy Create free account

hub / github.com/RainbowMango/GoExpertProgramming / functions

Functions27 in github.com/RainbowMango/GoExpertProgramming

↓ 4 callersFunctionAdd
Add 方法用于演示go test使用
source/gotest/unit.go:4
↓ 4 callersFunctionMakeSliceWithoutAlloc
MakeSliceWithPreAlloc 不预分配
source/gotest/benchmark.go:4
↓ 1 callersFunctionMakeSliceWithPreAlloc
MakeSliceWithPreAlloc 通过预分配Slice的存储空间构造
source/gotest/benchmark.go:15
↓ 1 callersFunctionPrintNames
PrintNames 打印学生姓名
source/gotest/example.go:17
↓ 1 callersFunctionSayGoodbye
SayGoodbye 打印两行字符串
source/gotest/example.go:11
↓ 1 callersFunctionSayHello
SayHello 打印一行字符串
source/gotest/example.go:6
FunctionBenchmarkMakeSliceWithPreAlloc
(b *testing.B)
source/gotest/benchmark_test.go:14
FunctionBenchmarkMakeSliceWithoutAlloc
(b *testing.B)
source/gotest/benchmark_test.go:8
FunctionBenchmarkSetBytes
(b *testing.B)
source/gotest/benchmark_test.go:20
FunctionBenchmarkSub
(b *testing.B)
source/gotest/subbenchmark_test.go:27
FunctionExamplePrintNames
检测乱序输出
source/gotest/example_test.go:20
FunctionExampleSayGoodbye
检测多行输出
source/gotest/example_test.go:12
FunctionExampleSayHello
检测单行输出
source/gotest/example_test.go:6
FunctionTestAdd
(t *testing.T)
source/gotest/unit_test.go:10
FunctionTestArgs
TestArgs 用于演示如何解析-args参数
source/gotest/unit_test.go:22
FunctionTestMain
TestMain 用于主动执行各种测试,可以测试前后做setup和tear-down操作
source/gotest/maintest_test.go:9
FunctionTestSub
TestSub 内部调用sub1、sub2和sub3三个子测试
source/gotest/subunit_test.go:46
FunctionTestSubParallel
TestSubParallel 通过把多个子测试放到一个组中并发执行,同时多个子测试可以共享setup和tear-down
source/gotest/subparallel_test.go:30
FunctionbenchSub1
(b *testing.B)
source/gotest/subbenchmark_test.go:9
FunctionbenchSub2
(b *testing.B)
source/gotest/subbenchmark_test.go:15
FunctionbenchSub3
(b *testing.B)
source/gotest/subbenchmark_test.go:21
FunctionparallelTest1
并发子测试,无实际测试工作,仅用于演示
source/gotest/subparallel_test.go:9
FunctionparallelTest2
并发子测试,无实际测试工作,仅用于演示
source/gotest/subparallel_test.go:16
FunctionparallelTest3
并发子测试,无实际测试工作,仅用于演示
source/gotest/subparallel_test.go:23
Functionsub1
sub1 为子测试,只做加法测试
source/gotest/subunit_test.go:10
Functionsub2
sub2 为子测试,只做加法测试
source/gotest/subunit_test.go:22
Functionsub3
sub3 为子测试,只做加法测试
source/gotest/subunit_test.go:34