blob: 69a4b4368c00f058cbdf8f531e2dca49f1d3d867 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*******************************************************************************
* Copyright 2025 Stefan Majewsky <majewsky@gmx.net>
* SPDX-License-Identifier: Apache-2.0
* Refer to the file "LICENSE" for details.
*******************************************************************************/
package options
import (
"testing"
. "github.com/majewsky/gg/internal/test"
. "github.com/majewsky/gg/option"
)
func TestFromPointer(t *testing.T) {
AssertEqual(t, FromPointer[int](nil), None[int]())
AssertEqual(t, FromPointer(PointerTo[int](42)), Some(42))
}
|