bridge_test.go

最后更新于:2022-04-02 04:48:54

~~~ package bridge import ( "fmt" "testing" ) func TestBridge(t *testing.T) { sa := SoftwareA{Software{"a"}} sb := SoftwareB{Software{"b"}} pa := NewPhoneA("pa") pb := NewPhoneB("pb") pa.setSoft(&sa) pa.Run() pb.setSoft(&sb) pb.Run() fmt.Println() p := TSoftware{&sb} p.Run() } ~~~
';