summaryrefslogtreecommitdiff
path: root/vendor/src/github.com/coreos/go-systemd/dbus/set_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/src/github.com/coreos/go-systemd/dbus/set_test.go')
-rw-r--r--vendor/src/github.com/coreos/go-systemd/dbus/set_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/src/github.com/coreos/go-systemd/dbus/set_test.go b/vendor/src/github.com/coreos/go-systemd/dbus/set_test.go
new file mode 100644
index 0000000000..d8d174d0c4
--- /dev/null
+++ b/vendor/src/github.com/coreos/go-systemd/dbus/set_test.go
@@ -0,0 +1,26 @@
+package dbus
+
+import (
+ "testing"
+)
+
+// TestBasicSetActions asserts that Add & Remove behavior is correct
+func TestBasicSetActions(t *testing.T) {
+ s := newSet()
+
+ if s.Contains("foo") {
+ t.Fatal("set should not contain 'foo'")
+ }
+
+ s.Add("foo")
+
+ if !s.Contains("foo") {
+ t.Fatal("set should contain 'foo'")
+ }
+
+ s.Remove("foo")
+
+ if s.Contains("foo") {
+ t.Fatal("set should not contain 'foo'")
+ }
+}