(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func TestPopFirstArg(t *testing.T) { |
| 107 | s, str, err := PopFirstArgument([]string{"a", "b", "c"}) |
| 108 | if s != "a" { |
| 109 | t.Fatal("Did not pop first argument successfully") |
| 110 | } |
| 111 | if str == nil { |
| 112 | t.Fatal("Did not return the rest of argument successfully") |
| 113 | } |
| 114 | if err != nil { |
| 115 | t.Fatal(err) |
| 116 | } |
| 117 | |
| 118 | //test invalid argument |
| 119 | _, _, err = PopFirstArgument([]string{}) |
| 120 | if err == nil { |
| 121 | t.Fatal("No argument given, should return error") |
| 122 | } |
| 123 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…