diff options
author | xengineering <me@xengineering.eu> | 2024-11-08 18:02:09 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-11-08 18:02:09 +0100 |
commit | 08ea24952ece9c82a932910126975d26e486758c (patch) | |
tree | 46a00316473ffa93ff99b3bcd1e95de81d69beb6 | |
parent | 45af2e59bbbf9e08014bda2d894b402f574c9516 (diff) | |
download | optional-go-08ea24952ece9c82a932910126975d26e486758c.tar optional-go-08ea24952ece9c82a932910126975d26e486758c.tar.zst optional-go-08ea24952ece9c82a932910126975d26e486758c.zip |
Test that empty optional does not exist
-rw-r--r-- | optional/main_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/optional/main_test.go b/optional/main_test.go new file mode 100644 index 0000000..2beb52a --- /dev/null +++ b/optional/main_test.go @@ -0,0 +1,15 @@ +package optional_test + +import ( + "testing" + + "xengineering.eu/optional-go/optional" +) + +func TestDefault(t *testing.T) { + var o optional.Optional[bool] + + if o.Exists { + t.Fatal("Empty optional claims to exist.") + } +} |