micrach/repositories/files_repository_test.go
Yanislav Igonin db8a46cdf1
build: modernize Wave 1 baseline (#16)
* chore: add agents md

* docs: expand repository and setup guides

* docs: plan project modernization

* docs: add Wave 1 implementation plan

* test: characterize legacy behavior

* build: update Go and Fiber v2

* fix(gateway): preserve duplicate auth behavior

* refactor(db): migrate to pgx v5

* refactor: replace deprecated I/O APIs

* build: add local PostgreSQL compose

* build: add multi-stage image

* ci: replace legacy deployment workflow

* fix(deps): update vulnerable Go modules

* docs: document modern development workflow
2026-07-16 16:08:54 +09:00

27 lines
532 B
Go

package repositories
import (
"reflect"
"testing"
)
func TestToInt32s(t *testing.T) {
tests := []struct {
name string
in []int
want []int32
}{
{name: "nil", in: nil, want: nil},
{name: "empty", in: []int{}, want: []int32{}},
{name: "values", in: []int{1, 2, 2147483647}, want: []int32{1, 2, 2147483647}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := toInt32s(tt.in); !reflect.DeepEqual(got, tt.want) {
t.Fatalf("toInt32s() = %#v, want %#v", got, tt.want)
}
})
}
}