mirror of
https://github.com/Estom/notes.git
synced 2026-04-24 18:42:39 +08:00
go知识重新整理
This commit is contained in:
17
Go/DesignPattern/flyWeight/flyweight_test.go
Normal file
17
Go/DesignPattern/flyWeight/flyweight_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @Author:zhoutao
|
||||
* @Date:2020/12/11 下午3:27
|
||||
* @Desc:
|
||||
*/
|
||||
|
||||
package flyWeight
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFlyWeight(t *testing.T) {
|
||||
viewer1 := NewImageViewr("image1.png")
|
||||
viewer2 := NewImageViewr("image1.png")
|
||||
if viewer1.ImageFlyWeight != viewer2.ImageFlyWeight {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user