diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2025-01-04 15:08:53 +0100 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2025-01-04 15:08:53 +0100 |
| commit | 807a25b638e38d7c0446bb728412fb16fd035035 (patch) | |
| tree | 4cfcb99bd00857ca3296b6dbb259976dcaaae689 /options/options_test.go | |
| download | go-gg-807a25b638e38d7c0446bb728412fb16fd035035.tar.gz | |
init
Diffstat (limited to 'options/options_test.go')
| -rw-r--r-- | options/options_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/options/options_test.go b/options/options_test.go new file mode 100644 index 0000000..69a4b43 --- /dev/null +++ b/options/options_test.go @@ -0,0 +1,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)) +} |
