(t *testing.T)
| 2162 | } |
| 2163 | |
| 2164 | func TestNoDirExists(t *testing.T) { |
| 2165 | mockT := new(testing.T) |
| 2166 | True(t, NoDirExists(mockT, "assertions.go")) |
| 2167 | |
| 2168 | mockT = new(testing.T) |
| 2169 | True(t, NoDirExists(mockT, "non_existent_dir")) |
| 2170 | |
| 2171 | mockT = new(testing.T) |
| 2172 | False(t, NoDirExists(mockT, "../assert")) |
| 2173 | |
| 2174 | var tempFiles []string |
| 2175 | |
| 2176 | link, err := getTempSymlinkPath("assertions.go") |
| 2177 | if err != nil { |
| 2178 | t.Fatal("could not create temp symlink, err:", err) |
| 2179 | } |
| 2180 | tempFiles = append(tempFiles, link) |
| 2181 | mockT = new(testing.T) |
| 2182 | True(t, NoDirExists(mockT, link)) |
| 2183 | |
| 2184 | link, err = getTempSymlinkPath("non_existent_dir") |
| 2185 | if err != nil { |
| 2186 | t.Fatal("could not create temp symlink, err:", err) |
| 2187 | } |
| 2188 | tempFiles = append(tempFiles, link) |
| 2189 | mockT = new(testing.T) |
| 2190 | True(t, NoDirExists(mockT, link)) |
| 2191 | |
| 2192 | errs := cleanUpTempFiles(tempFiles) |
| 2193 | if len(errs) > 0 { |
| 2194 | t.Fatal("could not clean up temporary files") |
| 2195 | } |
| 2196 | } |
| 2197 | |
| 2198 | func TestJSONEq_EqualSONString(t *testing.T) { |
| 2199 | mockT := new(testing.T) |
nothing calls this directly
no test coverage detected
searching dependent graphs…