refactor: load/save state as ptr
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
func TestCreateScience(t *testing.T) {
|
||||
race := "race_01"
|
||||
typeName := "First Step"
|
||||
g(t, func(p func(*controller.Param), g func() mg.Game) {
|
||||
g(t, func(p func(*controller.Param), g func() *mg.Game) {
|
||||
err := game.DeleteScience(p, race, typeName)
|
||||
assert.ErrorContains(t, err, e.GenericErrorText(e.ErrInputEntityNotExists))
|
||||
err = game.CreateScience(p, unknownRaceName, " "+typeName+" ", 1, 0, 0, 0) // TODO: test on dead race
|
||||
@@ -74,7 +74,7 @@ func TestCreateScienceValidation(t *testing.T) {
|
||||
{typeName, 0, 0, 0, -1, e.GenericErrorText(e.ErrInputCargoValue)},
|
||||
{typeName, 0, 1, 1, -1, e.GenericErrorText(e.ErrInputCargoValue)},
|
||||
}
|
||||
g(t, func(p func(*controller.Param), g func() mg.Game) {
|
||||
g(t, func(p func(*controller.Param), g func() *mg.Game) {
|
||||
for i, tc := range table {
|
||||
if tc.err == "" {
|
||||
err := game.CreateScience(p, race, tc.name+strconv.Itoa(i), tc.d, tc.w, tc.s, tc.c)
|
||||
|
||||
Reference in New Issue
Block a user