forked from go/golangs_learn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
268 B
17 lines
268 B
3 years ago
|
package memento
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNumber_ReinstateMemento(t *testing.T) {
|
||
|
number := NewNumber(7)
|
||
|
number.Double()
|
||
|
number.Double()
|
||
|
memento := number.CreateMemento()
|
||
|
number.Hide()
|
||
|
number.ReginstateMemento(memento)
|
||
|
fmt.Println(number.value)
|
||
|
}
|