Skip to content

Commit dbe0bd4

Browse files
committed
20220331
1 parent f24a6e2 commit dbe0bd4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

go-15/empty_interface_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ func TestEmptyInterfaceAssertion(t *testing.T) {
2525
DoSomething(1)
2626
fmt.Print("\n")
2727
DoSomething("1")
28+
fmt.Print("\n")
29+
DoSomething(1.1)
2830
}
2931

3032
//运行结果
3133
//=== RUN TestEmptyInterfaceAssertion
3234
//Integer类型的1
33-
//String类型的1--- PASS: TestEmptyInterfaceAssertion ( 0.00s)
35+
//String类型的1
36+
//未知类型的--- PASS: TestEmptyInterfaceAssertion (0. 00s)
3437
//PASS

0 commit comments

Comments
 (0)