summaryrefslogtreecommitdiff
path: root/optional/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'optional/main_test.go')
-rw-r--r--optional/main_test.go15
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.")
+ }
+}