| // Copyright 2021 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| package codifier |
| |
| import ( |
| "testing" |
| ) |
| |
| func TestPickUnskiplisted(t *testing.T) { |
| var p *Proc |
| if p.PickUnskiplisted("foo", "bar", "baz") != nil { |
| t.Error("expected nil Proc") |
| } |
| p = NewProcFromString("foo") |
| if p.PickUnskiplisted("foo", "bar", "baz") != nil { |
| t.Error("expected nil Proc due to no key stored") |
| } |
| } |
| |
| func TestAddToSkiplist(t *testing.T) { |
| var p *Proc |
| if p.AddToSkiplist("foo", "bar") != nil { |
| t.Error("expected nil Proc") |
| } |
| p = NewProcFromString("foo") |
| if p.AddToSkiplist("foo", "bar") != nil { |
| t.Error("expected nil Proc due to no key stored") |
| } |
| } |