blob: a93aa9e842ad2d5a21f62c7cbe6e31fa0d07d581 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*******************************************************************************
* Copyright 2025 Stefan Majewsky <majewsky@gmx.net>
* SPDX-License-Identifier: Apache-2.0
* Refer to the file "LICENSE" for details.
*******************************************************************************/
package option
import (
"reflect"
"testing"
)
func AssertEqual[V any](t *testing.T, actual, expected V) {
if reflect.DeepEqual(actual, expected) {
return
}
t.Helper()
t.Errorf("expected %#v, but got %#v", expected, actual)
}
func PointerTo[V any](value V) *V {
return &value
}
|